- ©«¤l
- 1180
- ¥DÃD
- 204
- ºëµØ
- 0
- ¿n¤À
- 1051
- ÂI¦W
- 0
- §@·~¨t²Î
- Mac.OS10.6
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2012-9-19
     
|
¥»©«³Ì«á¥Ñ PD961A ©ó 2010-5-25 21:19 ½s¿è
¦^´_ 7# ¤p»x
¦^ÂФp»xª©¥D:
¦p¦ó¨Ï¥Î CDO ª«¥ó¨Ó±H E-Mail
ºô¯¸PO¤åªºVB®M¤JCDO ( Collaboration Data Objects ) ª«¥ó ¡A ¹ïÀ³ÀÉ®× CDOSYS.dll ¡A ¥i¨ÑE-Mail ±H°e¨Ï¥Î
Dim objCDO As Object
Dim strCfg As String
Set objCDO = CreateObject("CDO.Message")
strCfg = "http://schemas.microsoft.com/cdo/configuration/"
With objCDO
.Sender = "[email protected]"
.From = "½Ö¬O±H¥óªÌ@NoOneKnows.com"
.To = "n±Hµ¹½Ö@whois.com.tw"
.Fields("urn:schemas:mailheader:X-Priority") = 1 ' Priority = PriorityUrgent °ªÀu¥ý¶¶§Ç
.Fields("urn:schemas:mailheader:return-receipt-to") = "½Ö¬O±H¥óªÌ@NoOneKnows.com" ' n¨DŪ¨ú¦^±ø
' .Fields("urn:schemas:httpmail:importance") = 2 ' Importance = High
' .Fields("urn:schemas:httpmail:priority") = 1 ' Priority = PriorityUrgent
.Fields.Update ' §ó·sÄæ¦ì
.Subject = "¨S¦³¥D¦®(»Ý©ñ¥DÃD)"
.TextBody = "TEXT" ' Text ¤å¦r®æ¦¡«H¥ó¤º®e
' ©Î HTML ºô¶®æ¦¡«H¥ó¤º®e
.HTMLBody = "<HTML>" & _
"<BODY>" & _
"<table border=""1"" width=""100%"">" & _
"<tr><td>I</td><td>am</td><td>Hammer</td><td>!</td></tr>" & _
"<tr><td>Who</td><td>r</td><td>u</td><td>?</td></tr>" & _
"</table>" & _
"</BODY>" & _
"</HTML>"
.AddAttachment "C:\AttFile.zip" ' ªþ¥[ÀÉ®×
.CC = "[email protected]" ' °Æ¥»
.BCC = "[email protected]" ' ±K¥ó°Æ¥»
.Configuration(strCfg & "sendusing") = 2 ' Sendusing = SendUsingPort
.Configuration(strCfg & "smtpserver") = "msa.hinet.net" ' SMTP Server
' .Configuration(strCfg & "smtpserverport") = 25 ' SMTP Server Port ( ¹w³]§Y¬° 25 )
' SMTP Server ¦p»Ýµn¿ý , «h»Ý³]©w UserName / Password
' .Configuration(strCfg & "sendusername") = "UserName" ' Send User Name
' .Configuration(strCfg & "sendpassword") = "Password" ' Send Password
.Configuration.Fields.Update ' §ó·s (Äæ¦ì) ²ÕºA
' .DSNOptions = 4 ' ¦^¶Ç«H¥ó¶Ç°eª¬ºA
' cdoDSNDefault = 0 , DSN commands are issued.
' cdoDSNDelay = 8 , Return a DSN if delivery is delayed.
' cdoDSNFailure = 2 , Return a DSN if delivery fails.
' cdoDSNNever = 1 , No DSNs are issued.
' cdoDSNSuccess = 4 , Return a DSN if delivery succeeds.
' cdoDSNSuccessFailOrDelay = 14 ,Return a DSN if delivery succeeds, fails, or is delayed.
.Send ' ¶Ç°e
End With
Set objCDO = Nothing
¦ý¬O¦p±z©Ò¨¥¥H²{¦bªº¤¤µØ¹q«H¨Ó»¡,SERVER¹ï¥~ªºIP³£¬O¥H³æ¤@©T©wIPµo«H.
§Y¨Ï¬O2±iºô¥d¦PIP¦ì§}¥çµLªk¦P®É¹ï¥~µo«H¦]¬°¥²¶·¨Ï¥Î¨â²Õ¤£¦P¹ï¥~ªºIP
©Ò¥H³Â·Ð±z¸Ñ´b¤F...
·PÁ±z!!
PS:¤£¹L¥¦(MAILSEVER)¥i¥H¼g±M®×ªº³á!
|
|