ÀÎÅ¥¹ö À©µµ¿ìÈ£½ºÆü¹ö´Â smtp¸¦ Áö¿øÇÏÁö ¾Ê±â ¶§¹®¿¡ ¸ÞÀϼ¹ö(mw-001.cafe24.com ¶Ç´Â mw-002.cafe24.com)¿¡ ¿¬µ¿ÇÏ¿© ¹ß¼ÛÇÒ ¼ö ÀÖµµ·Ï ¼Ò½º°¡ ÇÁ·Î±×·¡¹Ö µÇ¾î ÀÖ½À´Ï´Ù.
¡Ø Upload Componet´Â DEXTupload Pro¸¦ ¿¹·Î ÇÏ¿´À¸¸ç, »ç¿ëÇϽô Upload Componet¿¡ ¸Â°Ô²û ¼Ò½º¸¦ ¼öÁ¤ÇϽñ⠹ٶø´Ï´Ù.
<%
Set Uploadform = Server.CreateObject("DEXT.FileUpload")
Uploadform.DefaultPath = Server.MapPath("/¾÷·ÎµåÀúÀåÆú´õ¸í") '¶Ç´Â Àý´ë°æ·Î(Æú´õ¿¡ ¾²±â±ÇÇÑ ¼³Á¤ ÇÊ¿ä)
AttachFile = Uploadform("attachfile").FileName
Const cdoSendUsingMethod = "
http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSendUsingPort = 2
Const cdoSMTPServer = "
http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPort = "
http://schemas.microsoft.com/cdo/configuration/smtpserverport"
Const cdoSMTPConnectionTimeout = "
http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
Const cdoSMTPAccountName = "
http://schemas.microsoft.com/cdo/configuration/smtpaccountname"
Const cdoSMTPAuthenticate = "
http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
Const cdoBasic = 1
Const cdoSendUserName = "
http://schemas.microsoft.com/cdo/configuration/sendusername"
Const cdoSendPassword = "
http://schemas.microsoft.com/cdo/configuration/sendpassword"
Const cdoSendUsingPickup = "
http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory"
Dim objConfig ' As CDO.Configuration
Dim objMessage ' As CDO.Message
Dim Fields ' As ADODB.Fields ' Get a handle on the config object and it's fields
Set objConfig = Server.CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields ' Set config fields we care about
With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "¸ÞÀϼ¹öÁÖ¼Ò"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSendUserName) = "
POP¸ÞÀϾÆÀ̵ð@POP¸ÞÀϵµ¸ÞÀÎ"
.Item(cdoSendPassword) = "POP¸ÞÀϺñ¹Ð¹øÈ£"
.Item(cdoSendUsingPickup) = Uploadform.DefaultPath
.Update
End With
Set objMessage = Server.CreateObject("CDO.Message")
Set objMessage.Configuration = objConfig
With objMessage
.To = "
batman@gotham.com"
.From = "
superman@crypton.net"
.Subject = "Hello, this is test mail"
.HTMLBody = "Hello"
If AttachFile <> "" Then
.AddAttachment Uploadform.DefaultPath & "/" & AttachFile
End If
.Send
End With
Response.Write "Success"
Set Fields = Nothing
Set objMessage = Nothing
Set objConfig = Nothing
%>
POP¸ÞÀÏ°èÁ¤Àº [³ªÀǼºñ½º°ü¸®] > [À̸ÞÀÏ°èÁ¤ Ãß°¡/»èÁ¦] > [½Å±Ô°èÁ¤Ãß°¡]¿¡¼ °èÁ¤À» »ý¼º ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.
POP¸ÞÀϽÅû½Ã mw-001 ¶Ç´Â mw-002¸¦ È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.
¸®¼¿·¯ÀÏ °æ¿ì .Item(cdoSMTPServer) = "¸ÞÀϼ¹öÁÖ¼Ò"
ÀÌ ºÎºÐÀº .Item(cdoSMTPServer) = "mail-001.¸®¼¿·¯µµ¸ÞÀÎ" ¿Í °°ÀÌ ¼öÁ¤ÇØ ÁÖ¼¼¿ä.
ÀϹÝÀûÀÎ CDO ¸ÞÀϹ߼۰ú ´Ù¸¥Á¡Àº SMTP ÀÎÁõ¿¡ °üÇÑ ºÎºÐÀÌ Ãß°¡µÇ¾î ÀÖ´Â Á¡ÀÔ´Ï´Ù.
Âü°í·Î CDONTS °´Ã¼´Â ¿ø°ÝÁ¢¼Ó°ú SMTP ÀÎÁõ±â´ÉÀÌ ¾øÀ¸¹Ç·Î À§¿Í °°ÀÌ CDO ·Î ±¸ÇöÇÏ¼Å¾ß ÇÕ´Ï´Ù.