<!--#Include Virtual="/Include/initialize.asp"--> <!--#Include Virtual="/Include/DBCon.asp"--> <!--#Include Virtual="/Include/Common.asp"-->
<!-- 메일 전송 --> <% '///////////////////////////////////////////////////////////////// 'SMTP 기본정보 입력 SMTP_USER = "유저아이디" SMTP_PASS = "비밀번호" SMTP_SERVER = "smtp.gmail.com" SMTP_PORT = 465 ' SMTP 포트번호 SMTP_EMAIL_CERT_HTTP = "리턴받을 웹주소"
'// GUID 생성해서 값을 리턴하는 함수 Function fnGetGUID() Dim myTypeLib Set myTypeLib = Server.CreateObject("Scriptlet.Typelib") fnGetGUID = myTypeLib.guid Set myTypeLib = Nothing End Function
'// GUID 생성하기 Dim strGUID '// 좌우 {} 빼기 strGUID = Trim(fnGetGuid()) strGUID = Left(strGUID, Len(strGUID)-3) strGUID = Right(strGUID, Len(strGUID)-1) 'Response.Write strGUID & "<br/>"
' 호출주소와 guid를 합친다. SMTP_EMAIL_CERT_HTTP = SMTP_EMAIL_CERT_HTTP & strGUID 'Response.Write SMTP_EMAIL_CERT_HTTP
' Body htmlBody = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>" htmlBody = htmlBody & "<HTML>" htmlBody = htmlBody & "<HEAD>" htmlBody = htmlBody & "<TITLE> 이메일 인증 </TITLE>" htmlBody = htmlBody & "</HEAD>" htmlBody = htmlBody & "<BODY>" htmlBody = htmlBody & "<table border='0' cellpadding='0' cellspacing='0' width='720' style='font-family: '맑은 고딕', '돋움', 'Dotum', sans-serif;font-size: 14px; font-weight: 400;text-align: left; background-color: #202835; color:#BFC1C5;-webkit-font-smoothing: antialiased;'>" htmlBody = htmlBody & "<tbody>" htmlBody = htmlBody & "<tr>" htmlBody = htmlBody & "<td style='font-family: '맑은 고딕', 'Malgun Gothic', '애플산돌고딕네오', 'AppleSDGothicNeo', '애플고딕', 'AppleGothic', '돋움', 'Dotum', sans-serif;text-align: left; background-color: #242D3D; border-top-width: 1px; border-top-style: solid; border-top-color: #3E424E; color: #BFC1C5; padding: 0 30px 0 30px;'>" htmlBody = htmlBody & "<br>" & SMTP_USERID & " 님, 안녕하세요.<br> <br>" htmlBody = htmlBody & "이메일 주소를 인증하려면 아래 링크를 클릭해 주세요.<br>" htmlBody = htmlBody & "<a href='" & SMTP_EMAIL_CERT_HTTP & "' target='_blank'>메일 인증하기</a><br> <br>" htmlBody = htmlBody & "</td>" htmlBody = htmlBody & "</tr>" htmlBody = htmlBody & "</tbody>" htmlBody = htmlBody & "</table>" htmlBody = htmlBody & "</BODY>" htmlBody = htmlBody & "</HTML>"
'Response.Write htmlBody
'이메일 smtp Set iConf = Server.CreateObject("CDO.Configuration") Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTP_SERVER .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = SMTP_PORT .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = SMTP_USER .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = SMTP_PASS .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1 .Update End With Set CDOMail = server.CreateObject("CDO.Message") Set CDOMail.Configuration = iConf CDOMail.From = "<userid@gmail.com>" ' 자신의 E-mail 주소를 쓰세요 CDOMail.To = "<userid@gmail.com>" ' 받는이도 자신의 E-mail 주소를 쓰세요 CDOMail.Subject = "인증 메일 입니다. 확인해 주세요." CDOMail.HtmlBody = htmlBody CDOMail.Fields.update CDOMail.Send response.write "발송완료" Set Flds = Nothing Set iConf = Nothing Set CDOMail = Nothing %>
|