CDONTS 컴포넌트는 Window 2000 Server에서만 지원된다.
Window 2000 Server에서는 "CDONTS, CDO" 컴포넌트가 모두 지원이 됬지만
Window 2003 Server에서는 "CDO"만 지원된다.
따라서, 2003에서는 CDO를 이용해 웹메일을 구현해야만 한다.
== CDO를 이용한 웹메일 서비스 ======================================
<%
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 1 'cdoSendUsingPort 1=내부, 2=외부
.Item(sch & "smtpserverport") = 25 'SMTP Port
.Item(sch & "smtpserver") = "local" 'Mail Server Address or Domain or "localhost"
.update
End With
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "dazzilove@naver.com" '보내는이 메일주소
.To = "dazzilove@naver.com" '받는이 메일주소
.Subject = "Sample CDO Message" '메일제목
.TextBody = "This is a test for CDO.message" '메일형식지정 : HtmlBody or TextBody
.AddAttachment "c:\boot.ini" '파일첨부 (생략가능)
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>
===========================================================
만약, Exchange가 설치되어 있다면, 한가지 작업을 더 해주셔야 합니다.^^
IIS관리자의 해당 웹사이트 {속성}의 {홈 디렉토리} 탭에서 {응용 프로그램 풀}을 {ExchangeApplicationPool}로 지정하셔야 합니다.