HOME > 이용안내
이용안내
 
작성일 : 15-01-28 13:38
[스크립트언어] [ASP]windows2008R2 서버에서 cdo.message 사용시 에러 [CDO.Message.1 error '80040222' ]
 글쓴이 : 제이네트워크
조회 : 44,820  
[ASP]windows2008R2 서버에서 cdo.message 사용시 에러 [CDO.Message.1 error '80040222' ]
 
메일 소스를 이용해서 보내게 되면
CDO.Message.1 error '80040222'
The pickup directory path is required and was not specified.
이러한 오류가 있을 경우
 
 
[소스]
Const cdoSendUsingPort = 1  ' 상수선언 (로컬셋팅)

SET objMessage = Server.CreateObject("CDO.Message")
SET objConfig = createobject("CDO.Configuration")

'''''''''''''''''' Setting the SMTP Server ''''''''''''''''''''''''
SET Flds = objConfig.Fields

With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 30
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "C:\Inetpub\mailroot\Pickup"  (해주어야 합니다.)
.update
End With

SET objMessage.Configuration = objConfig

With objMessage
.From = "test@hanmail.net"
.To = "test@jnetwork.co.kr"
.CC = ""
.Subject = "hello world"
.HTMLBody = "hello wolrd"

.DSNOptions = 14
.Fields("urn:schemas:mailheader:return-receipt-to") = "master@naver.com"
.Fields("urn:schemas:mailheader:disposition-notification-to") = "master@naver.com"

.BodyPart.Charset="ks_c_5601-1987"
.HTMLBodyPart.Charset="ks_c_5601-1987"
.Fields.update
.Send
End With

SET objConfig = Nothing
SET objMessage = Nothing
 
 





Cloud server Streaming service Domain Cloud Firewall

제이네트워크 15-01-28 13:46
 
[간편설정]
  Set myMail=CreateObject("CDO.Message")
  myMail.Subject="CDOSYS"
  myMail.From="master@hanmail.net"
  myMail.To="receive@jnetwork.co.kr"

 myMail.Subject = "메일제목"
 myMail.HTMLBody = strHTML2
 myMail.BodyPart.Charset = "ks_c_5601-1987"
 myMail.HTMLBodyPart.Charset = "ks_c_5601-1987"
 myMail.TextBodyPart.Charset = "ks_c_5601-1987"
   
  myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=1  '(1일때 로컬네트워크, 2일때 원격네트워크)
  'SMTP server
  myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="localhost"
  'SMTP port
  myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
  myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "C:\Inetpub\mailroot\Pickup"
  myMail.Configuration.Fields.Update

  myMail.Send
  set myMail=nothing
 
 

Total 0

번호 제   목   글쓴이 날짜 조회
게시물이 없습니다.