Send and receive emails using CDOSYS

?o?n ASP n�y s? gi�p b?n g?i v� nh?n E-mail b?ng Microsoft's Collaboration Data Object.





L?u ?o?n m� tr�n th�nh 1 file d?ng .asp . B?n s? ph?i thay ??i th�ng tin nh?: domain name server, ??a ch? E-mail v� Password c?a b?n ? c�c d�ng m� sau:
cdoSMTPServer ="mail.yourdomain.com".
cdoSendUserName = "admin@yourdomain.com"
cdoSendPassword = "yourpassword"

Thay v� g?i b?ng textbody, b?n c� th? vi?t n?i dung E-mal nh? HTML v� thay ??i d�ng m� :

.TextBody to .HTMLBody

N?u b?n mu?n c� nhi?u h? th?ng E-mail h?n tr�n Web c?a b?n th� b?n ph?i l?u ph?n n�y trong c�ng m?t trang ?? ??m b?o n� kh�ng b? l?i: Name redefined:


B�y gi?, vi?c b?n ph?i l�m ti?p theo l� ch�p nh?ng ?o?n m� v�o file ASP:



<%
Set objMessage = Server.CreateObject("CDO.Message")
Set objMessage.Configuration = objConfig
With objMessage
.To = "Your Email"
.From = "Customer EMail"
.Subject = "Thank you for your registration"
.TextBody = "Hi, I hope you enjoy our service @ " & Now()
.Send
End With
Set Fields = Nothing
Set objMessage = Nothing
Set objConfig = Nothing
%>

This entry was posted on 02:41 and is filed under , .Follow any comments here with the RSS 2.0 . You can leave a response so that we can know your suggestion.
0 Responses to "Send and receive emails using CDOSYS"

Đăng nhận xét