• ÇÁ¸®Ä«¿îÅÍ
  • Ç÷¡½ÃºÏ
  • ÇÁ¸®º¸µå
  • Àü±¤ÆÇ
  • À¥°øºÎ¹æ
  • Ä¿¹Â´ÏƼ
±¸±Û Áö¸ÞÀÏ smtp¸¦ ÀÌ¿ëÇÑ ¸ÞÀÏ ¹ß¼Û 2011.09.27 06:12
±Û¾´ÀÌ : ¿î¿µÀÚ Á¶È¸ : 152 Ãßõ : 0

 

<%
Function GoogleSendMail(strTo, strFrom, strSubject, strBody)
On Error Resume Next

Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields

schema = "http://schemas.microsoft.com/cdo/configuration/"
Flds.Item(schema & "sendusing") = 2
Flds.Item(schema & "smtpaccountname") = "È«±æµ¿ <È«±æµ¿@gmail.com>"
Flds.Item(schema & "sendemailaddress") = "È«±æµ¿ <È«±æµ¿@gmail.com>"
Flds.Item(schema & "smtpuserreplyemailaddress") = "È«±æµ¿ <È«±æµ¿@gmail.com>"
Flds.Item(schema & "smtpserver") = "smtp.gmail.com"
Flds.Item(schema & "smtpserverport") = 465
Flds.Item(schema & "smtpauthenticate") = 1
Flds.Item(schema & "sendusername") = "È«±æµ¿@gmail.com"
Flds.Item(schema & "sendpassword") = "¸ÞÀϾÏÈ£"
Flds.Item(schema & "smtpusessl") = 1
Flds.Update

Set Flds = Nothing
Set iMsg = Server.CreateObject("CDO.Message")
With iMsg
.Configuration = iConf
.To = strTo ' ¹Þ´Â³Ñ
.From = strFrom ' º¸³»´Â³Ñ
.Subject = strSubject ' Á¦¸ñ
.HTMLBody = strBody ' ³»¿ë
SendEmailGmail = .Send
End With

set iMsg = nothing
set iConf = nothing
set Flds = nothing

If Err.number <> 0 Then
GoogleSendMail = Err.Description
Else
GoogleSendMail = 0
End If

End Function
%>

<%
' »ç¿ë¿¹
Ret = GoogleSendMail("¹ÞÀº»ç¶÷ À̸ÞÀÏ", "È«±æµ¿ <È«±æµ¿@gmail.com>", "Á¦¸ñÀ̱¸", "³»¿ëÀ̾ä")
%>

ÀλýÀº ª½À´Ï´Ù.
±×·¯¹Ç·Î ´Ù¸¥ »ç¶÷ÀÌ ¿ä±¸ÇÏ´Â »îÀ» »ì¸é¼­ ½Ã°£À» ³¶ºñÇؼ­´Â ¾È µË´Ï´Ù.
µ·°ú ¸í¿¹¸¦ ¾òÁö ¸øÇÏ´õ¶óµµ ³¡±îÁö ÀÚ½ÅÀÇ ±æÀ» °íÁýÇϽʽÿÀ
¸ñ·Ï À­±Û ¾Æ·§±Û
³»¾Ë FREECOUNT.NET ÇÁÄ«³Ý »ý±ä³¯ 2003.12.20 Ȩ | Ä«¿îÅÍ | Ç÷¡½ÃºÏ | ÇÁ¸®º¸µå | Àü±¤ÆÇ | À¥°øºÎ¹æ | Ä¿¹Â´ÏƼ | ÂÊÁöÇÔ