smtpserver = "smtp.gmail.com"
youremail = "xxx@gmail.com"
yourpassword = "xxx"
.Update
.BodyPart.
.
.
.From = "nthaih@yahoo.com"
.HTMLBody = "<p style='color:red'>Tiếng Việt tốt </p> " ' we are sending a html email.. simply switch the comments around to send a text email instead
'.TextBody = strBody
ObjSendMail.Send
youremail = "xxx@gmail.com"
yourpassword = "xxx"
Dim
ObjSendMailSet
ObjSendMail = CreateObject
("CDO.Me
ssage")Set
objFields = ObjSendMail.Configuration
.Fields
With
objFields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network)..Item
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpserver.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465.Item
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1 'Use SSL for the connection.Item
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60.Item
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication.Item
("http://schemas.microsoft.com/cdo/configuration/sendusername") = youremail.Item
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = yourpassword.Update
End
With
With
ObjSendMail.BodyPart.
Char
set = "utf-8".
To
= youremail.
Sub
ject = "Tiếng Việt tốt".From = "nthaih@yahoo.com"
.HTMLBody = "<p style='color:red'>Tiếng Việt tốt </p> " ' we are sending a html email.. simply switch the comments around to send a text email instead
'.TextBody = strBody
End
With
ObjSendMail.Send
Set
objFields = Not
hing
Set
ObjSendMail = Not
hing
Nguồn:
http://www.cjwsoft.com/paypal_email_via_gmail.asp
http://www.wysiwyg.co.il/asp-CDO-Message-Mail-utf8-Charset.asp
Không có nhận xét nào:
Đăng nhận xét