2003서버에서 메일보내기

2000서버에서는 메일보낼때 CDONTS.NewMail 객체를 쓰는데
2003서버에서는 바꼈네요 CDO.Message 로

코드:
sub send_mail(str_address,str_subject,str_body)
‘Set objMail = CreateObject(“CDONTS.NewMail”)
Set objMail = CreateObject(“CDO.Message”)

objMail.From= “메일주소” ‘ 보내는 사람
objMail.Subject=str_subject ‘글의 제목

objMail.HtmlBody=str_body

objMail.To = str_address ‘받는 사람
objMail.Send

Set objMail = nothing

end sub

Comments

Powered by Facebook Comments

댓글 남기기

당신의 이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다.

*

다음의 HTML 태그와 속성을 사용할 수 있습니다: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>