|
Cdosys Component - Mail Code
<%
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = Server.CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort
.Item(sch & "smtpserver") = "mail.yourdomain.com" 'Your
smtp server ip - 127.0.0.1
.update
End With
Set cdoMessage = Server.CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "yourmail@yourdomain.com"
.To = "mail@anydomain.com"
.Subject = "You have recieved mail!"
.HTMLBody = HTML
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>
Mailenable Component - Mail Code
<%@
Language=VBScript %>
<%
Dim oMail
Set oMail = server.CreateObject("MEMail.Message")
oMail.MailFrom = "yourmail@yourdomain.com"
oMail.MailFromDisplayName = "DisplayName"
oMail.ContentType = "text/html;"
oMail.MailTo ="mail@anydomain.com"
oMail.Subject = "SubjectName"
oMail.MessageBody = "Hello there,Welcome to our new
service."
oMail.SendMessage
Set oMail = Nothing
Response.Write "success"
%>
Conecting to Mysql database
connecting to mysql
myconn.Open "DRIVER={MySQL ODBC 3.51 Driver};" & _
"Server=localhost;" & _
"Port=3306;" & _
"Option=16384;" & _
"Stmt=;" & _
"Database=yourdbname;" & _
"Uid=user id;" & _
"Pwd=password"
Conecting to MS-Sql database
SQLClientConnectionString="Server=SQLSERVER_IPAddress;
Database=DATABASE_NAME;uid=YourUserName;pwd=YourPassword;"
Conecting to MS-Access database
con.open "Driver={Microsoft Access Driver (*.mdb)};DBQ="
& Server.Mappath("/Databases/test.mdb")
Shrinking MS-SQL database Logs
backup log your_db with
TRUNCATE_ONLY
DBCC SHRINKFILE(your_db_log, 2) |