±îÆä °Ô½ÃÆÇ¿¡ ÀÖ´ø ¸ÞÀÏ ÇÁ·Î±×·¥À» Å×½ºÆ® ÇØº¸´Ï
¸ÞÀÏ ÀÎÁõ¿¡¼ ¿À·ù°¡ ³ª±â¿¡ ÃֽŹöÁ¯ ã¾Æ¼ ¿Ã¸³´Ï´Ù.
¿ì¼± ÇÁ·Î±×·¥Àº ¿©±â¼ ¹ÞÀ¸½Ã¸é µÇ°í¿ä.
http://www.topwizprogramming.com/freecode/emailsmtp.zip
¼Ò½º
1. Global Variables¿¡ ¾Æ·¡ ÇÑÁÙ Ãß°¡ÇØ Áֽðí¿ä. (·ÎÄà º¯¼ö¿¡ ¼±¾ðÇØµµ °£°Ô ¾øÀ»µí ½Í¾îÀ¯...)
n_smtp gn_smtp // ¸ÞÀÏ ¹ß¼ÛÀ» À§ÇÑ º¯¼ö
2. ¾Æ·¡ 2°³¸¸ »ç¿ëÇÏ½Ç ¶óÀ̺귯¸®¿¡ º¹»çÇØ ³ÖÀ¸½Ã°íÀ¯ (´Ù¸¥°Ç µðÀÚÀÎÀûÀΰŶó ÀÇ¹Ì ¾øÀ»µí ½Í¾îÀ¯...)
n_smtp n_winsock
3. ¹öư Çϳª ¸Í±×½ÅÈÄ¿¡À¯...
String ls_body, ls_server, ls_uid, ls_pwd String ls_filename, ls_port,
ls_encrypt Integer li_idx, li_max Boolean lb_html, lb_Return UInt
lui_port
SetPointer(HourGlass!)
// HTML ¸ÞÀÏ·Î º¸³¾¶§ ¾Æ·¡²¨ ÁÖ¼® Áö¿öÁÖ¼¼À¯...
//If cbx_sendhtml.Checked Then // üũ¹Ú½º ¸¸µé¾î¼ HMTL / TEXT ¸ÞÀÏ ¼±ÅÃÇϵµ·Ï
ÇѰÅÀÓ // ls_body = "<html><body bgcolor='#FFFFFF' topmargin=8
leftmargin=8><h2>" // ls_body += of_replaceall(mle_body.text,
"~r~n", "<br>") + "</h2>" // ls_body +=
"</body></html>" // lb_html = True //Else // ls_body =
mle_body.text // lb_html = False //End If
// *** set email properties *********************
gn_smtp.of_ResetAll() gn_smtp.of_SetPort(25) gn_smtp.of_SetServer("¸ÞÀϼ¹öÀ̸§") gn_smtp.of_SetReceipt(False) gn_smtp.of_SetLogFile(False,
"smtp_logfile.txt") gn_smtp.of_SetSubject("¸ÞÀÏ Á¦¸ñ") gn_smtp.of_SetBody("¸ÞÀÏ
³»¿ë", False) gn_smtp.of_SetFrom("¹ß¼Û¸ÞÀÏÁÖ¼Ò", "¹ß¼ÛÀÚÀ̸§") gn_smtp.of_AddAddress("¼ö½ÅÀÚ¸ÞÀÏÁÖ¼Ò", "¼ö½ÅÀÚÀ̸§")
// *** set Userid/Password if required ********** gn_smtp.of_SetLogin("¾ÆÀ̵ð", "ÆÐ½º¿öµå")
// *** add any attachments **********************
// ¿©±ä ÷ºÎÆÄÀÏÀÓ gn_smtp.of_AddAttachment(ÆÄÀÏÀ̸§Àΰ¡ °æ·ÎÀΰ¡ ³Ö¾îÁÖ¸éµÉµí) //li_max =
lb_attachments.TotalItems() //For li_idx = 1 To li_max // ls_filename =
lb_attachments.Text(li_idx) // gn_smtp.of_AddAttachment(ls_filename) //Next
// *** send the message ************************* // ¸ÞÀÏ ¼¹ö ·Î±×ÀÎ ¹æ½Ä
ls_encrypt = "" choose case ls_encrypt case "SSL" lb_Return =
gn_smtp.of_SendSSLMail() case "TLS" lb_Return =
gn_smtp.of_SendTLSMail() case else lb_Return =
gn_smtp.of_SendMail() end choose
If lb_Return Then MessageBox("SendMail", "Mail successfully
sent!") Else MessageBox("SendMail Error",
gn_smtp.of_GetLastError()) End If
³¡...
½±°Ô ÀÀ¿ë °¡´É ÇϽDz¨À¯...
Å×½ºÆ® ȯ°æ : Windows7 (64Bit), Appeon 6.5 ´Ù µÊ...
ÅÂ±× : »ç¹«Á÷ÀÌ ÀÌ·±°É ÇØ¾ßµÇ´Â°ÇÁö ¤Ð¤Ð
|