ABCHK Support

返回主頁電郵支援 網頁寄存支援 Outlook錯誤碼DIY 網頁製作說明
搜尋文件夾管理表格下載一問一答聯絡我們

Question : 
I had been find out the new window server 2003 that my .asp web page had problem to send email 
from the web server through CDONT service ?

Answer
Because the win2003 use the new object CDO instead of CDONT.
please using the codeing below for your .asp web page

==================================================================

<%
dim objCDO, objConfig
 Set objCDO = Server.CreateObject("CDO.Message")
' add
Set objConfig = CreateObject("CDO.Configuration")

 'Configuration:
 objConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort 
 objConfig.Fields(cdoSMTPServer) = "smtp.abchk.com"
 objConfig.Fields(cdoSMTPServerPort) = 25 
 objConfig.Fields(cdoSMTPAuthenticate) = cdoAnonymous  
 'objConfig.Fields(cdoSMTPConnectionTimeout) =10
 'objConfig.Fields(cdoSMTPAuthenticate) = cdoBasic

 '(1) Your UserID on the SMTP server (don't use postmaster@yourdomain.com)
 objConfig.Fields(cdoSendUserName) = "youruserid"
 '(2) Your password on the SMTP server
 objConfig.Fields(cdoSendPassword) = "yourpassword"

 'Update configuration
 objConfig.Fields.Update
 Set objCDO.Configuration = objConfig
 
 '(3) Your Email Address on the SMTP server
 objCDO.From = "youremailaddress"
 
 '(4) Email to
 objCDO.To = "emailto"

 '(5) Your Email Subject
 objCDO.Subject = "youremailsubject"

 '(6) Email Body
 strMsgInfo = strMsgInfo  & " EMAIL BODY " & vbCrLf

 objCDO.TextBody=strMsgInfo
 objCDO.HTMLBody=strMsgInfo
 objCDO.Send
 Set objCDO = Nothing
'Response.Redirect(Request("redirect"))
%>

==================================================================

Back  - Contact Us - Content Search
SPAMMING or Mass Mailling not Allow

Powered by ABCHK.com