web tools rank checker

domain .cn
.net .cn .com.cn
你正在阅览 :: 简体中文:: 学习 ASP SQL VB HTML code

学习 .ASP SQL HTML XML CSS JAVA Perl code study
English Chinese_Traditional Chinese_Simplified

你正在阅览 :: 简体中文 Chinese_Simplified

学习.主题:
首页
ASP
. Active-Server-Flash
. Array
. Connection
. Count
. Counter
. Distinct
. Email
»CDO.Message
»JMail.SMTPMail
»Persits.MailSender
»SMTPsvg.Mailer
. File
. Folder
. Function
. GetSQLserver
. Header
. mySQL
. Record
. Recordset
. Request
. Response
. Server
. Server-CreateObject
. ServerVariables
. Session
. Special-Symbols
. String
. Sub
. Time
CSS
Ecommerce
HTML
InternetProtocol
JAVA
Microsoft
Robots
SearchEngine
SQL
SQLserver
VBscript
XML

SiteMap

3w....学习.教学 > ASP > email » cdo.message

3w learning

email >
cdo.message

Title:

CDONTS : Set objMessage = Server.CreateObject("CDO.Message")


CDO.Message 电子邮件 CDONTS
Description:

Set objMessage = Server.CreateObject("CDO.Message") sending TEXT : objMessage.TextBody sending HTML : objMessage.HTMLBody sending Attachment : objMessage.AddAttachment ------all email shall contain with an email@address----- objMessage.To = "to@---.com" objMessage.From = "from@---.com" objMessage.Bcc = "Bcc@---.com" objMessage.Cc = "Cc@---.com" ------------- objMessage.send ------------- you may have 2 or more objMessage.send objMessage2.send objMessage3.send in on script -------------------Server Address---------------- it is different with Server.CreateObject("JMail.SMTPMail") when use Server.CreateObject("CDO.Message") you do not list your Server Address in the script -------- How yahoo receive this kind of email----- yahoo treat this kind of auto send out letter as bulk email unless the address is listed on your address book ------------- Every email has an ID ------------- !!! Do not send junk emails !!! Each email has its own ID and mail server name... Your local server shall also receive each email ID


CDONTS为常用的寄件系统
并且可寄出HTML超文模式, 附件文件
不须提供SMTP server 名称或IP
可寄出TEXT型式
或寄出HTML模式
Example Code:

---- sending File : objMessage.AddAttachment ---- <% Dim objMessage Set objMessage = CreateObject("CDO.Message") objMessage.To = "to@---.com" objMessage.From = "from@---.com" objMessage.Bcc = "Bcc@---.com" objMessage.Cc = "Cc@---.com" objMessage.Subject = "Subject" objMessage.AddAttachment "c:\a-file.txt" objMessage.send 'free up the the computer memory Set objMessage = Nothing %> ----sending TEXT : objMessage.TextBody---- <% Dim objMessage Set objMessage = CreateObject("CDO.Message") objMessage.To = "to@---.com" objMessage.From = "from@---.com" objMessage.Bcc = "Bcc@---.com" objMessage.Cc = "Cc@---.com" objMessage.Subject = "Subject" objMessage.TextBody = "sending text only" objMessage.send 'free up the the computer memory Set objMessage = Nothing %> ----sending HTML : objMessage.HTMLBody---- <% Dim objMessage Set objMessage = CreateObject("CDO.Message") objMessage.To = "to@---.com" objMessage.From = "from@---.com" objMessage.Bcc = "Bcc@---.com" objMessage.Cc = "Cc@---.com" objMessage.Subject = "Subject" objMessage.HTMLBody="<b>CDO HTML mail example</b><br>" objMessage.HTMLBody=objMessage.HTMLBody&"a test html email" objMessage.HTMLBody=objMessage.HTMLBody&"<br>a line<hr>" objMessage.HTMLBody=objMessage.HTMLBody&"<br>Regards," objMessage.HTMLBody=objMessage.HTMLBody&"<br>Ezer" objMessage.send 'free up the the computer memory Set objMessage = Nothing %> -----------------err message code-------------- strErr = "" On Error Resume Next ' catch errors If Err <> 0 Then ' error occurred strErr = Err.Description response.write "CDONTS email error occurred : <br>" response.write "Error: "&strErr&"<br>"&vbcrlf else response.write "CDONTS email sent out with no error" End If --------------------------------------


----注意网络安全----
最佳设定你的电子邮件信箱浏览方式为::
将信件全以text文字化显示出
(你将会看到所有的HTML的原始档)
请记得若以HTML读取或预览来路不明的
信件时,是有可能会提升你的计算机被骇的危险性
Example Result:

TEXT :: sending text only HTML :: CDO HTML mail example
a test html email
a line



Regards,
Ezer


For the mail body info you may write like this way If you are writing a text form then just take off html tags. <% bodyinfo="Dear receiver,<br>" bodyinfo=bodyinfo&"It is nice to talk to you<br>" bodyinfo=bodyinfo&"May this method helps you.<p>" bodyinfo=bodyinfo&"Best Regards,<br>" bodyinfo=bodyinfo&"3w.ezer.com" objMessage.HTMLBody = bodyinfo %>


..
...
...

[ 7/27/2008 ]

www learning school add more scripts and tips memo
You are at >>3WS.EZER.COM >> 3WS.EZER.COM/ASP/EMAIL/CDO.MESSAGE.ASP>>ASP
Helpful link:: SEO web tools :: Live PR | SERP checker
back to top Ezer code adding :: Questions ;email