ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[±Ð¾Ç] (¹ê¾Ô±MÃD) ºô¸ô°Ý¨÷ E-mai lª©

[±Ð¾Ç] (¹ê¾Ô±MÃD) ºô¸ô°Ý¨÷ E-mai lª©

§Q¥ÎE-mailªº¤è¦¡¶Ç°e¬ÛÃöºô­¶¸ê®Æªº½T¬O«D±`¨ã¦³¤¬°Ê©Ê¡A¦]¬°ºÞ²zªÌ©Î¬O°Ý¨÷½Õ¬d¥D«ù¤H¦¬¨ì¬ÛÃöªº°Ý¨÷¸ê®Æ«á¥i¥H°¨¤Wªº§@¥X¦^À³»P¤Ï¬Ù§ïµ½¡A¬Æ¦Ü¥i¥H¥ß§Y¥HE-mail¦^«Hµ¹¶ñ¼g°Ý¨÷ªÌ¡AÅý°Ý¨÷¶ñ¼gªÌ¤F¸Ñ§Ú­Ì¬O«D±`¯u¸Û¦Ó»{¯uªº¬Ý«Ý¥L­Ì©Ò´£¥XªºÄ_¶Q·N¨£!!

E-mailª«¥ó
­n¦bASPµ{¦¡¤¤¦Û°Ê¶Ç°eE-Mail¦³³\¦h¤èªk¡A¤p»x¦b¦¹¤¶²Ðªº¬°³Ì±`¨£ªº¤@ºØ¤è¦¡¡GCODNTS.NewMail¡ACDONTS.NewMailª«¥ó¬OIIS¤¤©Ò´£¨Ñªº¤@ºØ«H¥ó¶Ç°eª«¥ó¡APWS¨Ã¨S¦³´£¨Ñ³o¶µª«¥ó¡A¦ý±z¤£¥Î¾á¤ß¡Iºô¸ô¦øªA¥D¾÷¤j¦h¥HNT¬°¥­¥x¡A¦]¦¹³£·|¨ã¦³¦¹¶µ¶l¥ó¶Ç°eª«¥ó¡C

«Ø¥ßCDONTS.NewMailª«¥ó

¡@­n¦³E-Mail¶Ç°eªº¥\¯à¡A§Ú­Ì¥²¶·¥ý«Ø¥ßE-Mailª«¥ó¡A«Ø¥ß¤è¦¡¦p¤U¹Ï©Ò¥Ü¡G

9-18.png

¡@§Ú­Ì±H°e«H¥ó®É»Ý­n¶ñ¼gªº¶µ¥Ø¦³­þ¨Ç¡H¤@¯ë«H¥ó±H°e¦³¦¬¥ó¤H¡B±H¥ó¤H¡B«H¥ó¥D¦®»P«H¥ó¤º®eµ¥¥|¶µ¡A³o¥|¶µ¦P®É¤]¬O§Ú­Ì«H¥ó¦Û°Ê¶Ç°eª«¥óªº¥|­Ó¥D­nÄÝ©Ê¡G

9-19.png

ª`·N¡G
CDONTS.NewMailª«¥óªº¦¬¥ó¤H(To)¡B±H¥ó¤H(From)¡B«H¥ó¥D¦®(Subject)»P«H¥ó¤º®e(Body)µ¥¥|¶µÄÝ©Ê¡A¨äÄݩʭȳ£¬O¦r¦ê«¬¦¡¡A¥²¶·¨Ï¥ÎÂù¤Þ¸¹¨í°_¨Ó¡I


°e¥X¶l¥ó
¡@·í§Ú­Ì³]©w¦nCDONTS.NewMailª«¥óªº¦¬¥ó¤H(To)¡B±H¥ó¤H(From)¡B«H¥ó¥D¦®(Subject)»P«H¥ó¤º®e(Body)¤º®e«á¡A¦¹®É¥u¬O§¹¦¨«H¥óªº¼¶¼g¡A¶l¥óÁÙ¨S¦³³Q¶Ç°e¥X¥h¡A­n¡y¶Ç°e¡z¶l¥ó¥²¶·©I¥sSent¤èªk¡G

9-20.png


´£¥Ü
CDONTS.NewMailª«¥ó¬O§Ú­Ì¦b¦w¸ËIIS®É¦³¤Ä¿ïSMTP Service¶µ¥Ø®É¤~·|³Q¦w¸Ë¶i¨t²Î¤¤¡A¦pªG§A¨Ï¥ÎIIS¦ý¬O¦w¸Ë·í®É¨Ã¥¼¤Ä¿ïSMTP Service¶µ¥Ø¡A«h²{¦b§A¥i¥H³z¹LIISªº·s¼W¡þ²¾°£¥\¯à¨Ó·s¼WSMTP Service¡C
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

½d¨Òµ{¦¡¬yµ{
¥»½d¨Òµ{¦¡ªº¬yµ{«Ü²³æ¡A¦@¤À¬°¤T­Ó³¡¤À¡Ain.asp(°Ý¨÷¶ñ¼g)¡Bsentmsg.asp(¶Ç°e°Ý¨÷µ²ªG)¡Bqustion.mdb(°Ý¨÷ÃD¥Ø¸ê®Æ®w)¡A¦p¤U¹Ï©Ò¥Ü¡G

9-21.png


  • in.aspµ{¦¡ºô­¶

    ¡@·í³sµ²¶i¤Jin.aspµ{¦¡ºô­¶«á¡Aºô­¶¤¤±N·|Åã¥Ü°Ý¨÷ªºÃD¥Ø»P·N¨£¿ï¾Ü©Î·N¨£¶ñ¼gªºÄæ¦ì¡A¦p¤U¹Ï©Ò¥Ü¡G



    ¡@°£¤F¦C¥X°Ý¨÷ªºÃD¥Ø»P·N¨£¿ï¾Ü©Î·N¨£¶ñ¼gªºÄæ¦ì¡A§Ú­ÌÁÙ¼W¥[¤F¤@­Ó®aªø©m¦WÄæ¦ì(³o¼Ë§A¤~ª¾¹D³o¥÷°Ý¨÷¬O½Ö¶ñ¼gªº)¡AÁÙ¦³¤@­Ó¶ñ¼gE-mailªºÄæ¦ì(³o´N¬OCDONTS.NewMailª«¥óªº±H¥ó¤H(From)ÄÝ©Ê­È)¡A¦Ó©Ò¦C¥Xªº°Ý¨÷ÃD¥Ø¤Î·N¨£¿ï¶µ«h¬OŪ¨ú¦Ûquestion.mdb¸ê®Æ®w¤¤ªºquestion¸ê®Æªí¡C

  • sentmsg.aspµ{¦¡
    ¡@¦bin.aspµ{¦¡ºô­¶¤¤«ö¤U¡y°e¥X°Ý¨÷¡z«ö¶s«á¡Aªí³æ¤¤ªº¸ê®Æ´N·|°e¥æsentmsg.aspµ{¦¡³B²z¡Asentmsg.aspµ{¦¡±N·|§â°Ý¨÷¶ñ¼gµ²ªG»P¶ñ¼gªÌªº¸ê®Æ¡A¥HE-Mail¦Û°Ê¶Ç°eªº¤è¦¡±H°e¦ÜºÞ²zªÌ©Î¬O°Ý¨÷½Õ¬d¥D«ù¤Hªº¤â¤¤¡C
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

°Ý¨÷µ{¦¡ºô­¶
­º¥ý¦b°Ý¨÷µ{¦¡ºô­¶¤¤³]©w¤@­Ó®aªø©m¦Wªº³æ¦æ¤å¦rÄæ¦ì¡A¤Î¤@­Ó¶ñ¼gE-mailªº³æ¦æ¤å¦rÄæ¦ì¡F®aªø©m¦Wªº³æ¦æ¤å¦rÄæ¦ìNameÄÝ©Ê´N³]©w¬°Name¡A¦Ó¶ñ¼gE-mailªº³æ¦æ¤å¦rÄæ¦ìNameÄÝ©Ê«h³]©w¬°email¡A¨£¤U¹Ï¡C

9-23.png

¦b°Ý¨÷µ{¦¡ºô­¶¤¤³Ì³Â·Ðªº³¡¤À´N¬O¦p¦ó§â§Ú­Ì¸ê®Æ®w¤¤ªºÃD¥Øµ¹Åª¨ú¨ÃÅã¥Ü¥X¨Ó¡A¦]¬°¦b§Ú­Ì°Ý¨÷ªí³æªº³]­p¤W¬°¤F°t¦XÃD«¬ªº¤£¦P¦Ó¤À¬°³æ¦æ¤å¦r¤è¶ô(Text)»P³æ¿ï«ö¶s(Radio)¡A¦pªG°Ý¨÷ÃD«¬¬°¿ï¾ÜÃDªº¸Ü¡A§Ú­Ì¥²¶·¦C¥X³Æ¿ïªºµª®×¡A¦Ó°Ý¨÷ÃD«¬­Y¬O°ÝµªÃDªº¸Ü«h¥²¶·¦³¤å¦rÄæ¦ì¨Ñ°Ý¨÷¶ñ¼gªÌ¶ñ¼g·N¨£¡G

9-24.png

¡@¦]¦¹¡A§Ú­Ì¥²¶·¥ý§PÂ_§Ú­Ì°Ý¨÷ÃD¥ØªºÃD«¬¡A¦pªG¬O¿ï¾ÜÃDªº¸Ü¡A«h¤T­Óµª®×¿ï¶µªºNameÄݩʳ£¥²¶·¬Û¦P¡A¦Ó¿ï¶µªºÄÝ©Ê­È(Value)«h¥²¶·ÀH³Æ¿ïµª®×ªº¤£¦P¦ÓÅܧó¡F­Y¬O°ÝµªÃD´N¤ñ¸û¦n³B²z¥u­n³]©w¤å¦rÄæ¦ìªºNameÄÝ©Ê´N¥i¥H¤F¡C

¦b¦U­ÓÃD¥Øµª®×¶µ¥Øªº©R¦W¡A§Ú­Ì³£±Ä¥Î¡yNo¡z¥[¤W¡yrs("ÃD¸¹")¡z¨Ó©R¦W¡A¨Ò¦p¡G°Ý¨÷²Ä¤@ÃD¡AÁöµM¦³¤T­Ó³Æ¿ïµª®×¿ï¶µ¡A¦ý¬O¥¦­ÌªºNameÄݩʳ£¬O¡yNo1¡z¡G

9-25.png

¡@¦Ó³Æ¿ïµª®×¿ï¶µªº­È«h¨Ì§Ú­Ì¸ê®Æ®w¤¤¡y¿ï¶µ¡zÄæ¦ìªºªº­È¦ÓÅÜ°Ê!!

9-26.png

©Ò¥H·íµ{¦¡ºô­¶°õ¦æ«á¡A§Ú­ÌÀ˵øºô­¶ªº­ì©l½X±N¦p¤U¹Ï©Ò¥Ü¡G

9-27.png

ÃD«¬¤£¦P²£¥Í¤£¦PªºµªÃD¤è¦¡
¡@¦b¥»½d¨Ò¤¤³]©w¤F¨âºØÃD«¬¡G¿ï¾ÜÃD»P°ÝµªÃD¡A¦]¦¹§Ú­Ì¥²¶·®Ú¾Ú¸ê®Æ¿ýªºÃD«¬Äæ¦ì¨Ó¨M©w§Ú­Ì°ÝÃDªºÅã¥Ü¤è¦¡¡G



  • ¨Ï¥ÎWhile - Wend °j°é±Ô­z°t¦X§ïÅܧ@¥Î¤¤¸ê®Æ¿ý¦ì¸mªºMoveNext¤èªk¡A±N©Ò¦³ªº°Ý¨÷ÃD¥Ø¦Û¸ê®Æ®w¸ê®Æªí¤¤Åª¨ú¥X¨Ó¡C
  • §Q¥ÎIF§PÂ_±Ô­z¨Ó¿ë§O¸ê®Æ¿ý¡yÃD«¬¡zÄæ¦ì¤¤©Ò³]©wªº°Ý¨÷ÃD¥Ø«¬¦¡¡C
  • ¦pªG¡yÃD«¬¡z¬O¿ï¾ÜÃD¡A«h§Q¥ÎFor°j°é±Ô­z¦C¥X¦U³Æ¿ïµª®×¡A½Ðª`·N¡A¥»½d¨Òªº³Æ¿ïµª®×¥u¦³¤T­Ó¡A©Ò¥HFor°j°éªº°_©l­È¬°¢°¡A¦Ó²×­È¬°¢²¡C
  • ¦C¥X³Æ¿ïµª®×ªº¿ï¾Ü¶sÄݩʭȱԭz¬Ors("¿ï¶µ" & I)¡A¦ý¬O¡A¦bºô­¶¤¤¦C¦L¥X¿ï¶µ»¡©ú¤å¦rªº±Ô­z«h¬°Server.HTMLcoder("¿ï¶µ" & I)¡C
  • ¦pªG¡yÃD«¬¡z¬O°ÝµªÃD«hª½±µ³]©w³æ¦æ¤å¦r¿é¤J¤è¶ô§Y¥i¡C


´£¥Ü
Server.HTMLEncoder¬°HTML½s½X±Ô­z¡A¦pªG¦b¸ê®ÆÄæ¦ì¤¤§t¦³Html¼ÐÅÒ±Ô­z¡A«h³o­Ó¼ÐÅÒ±Ô­z±N¤£·|³QÂsÄý¾¹¸ÑĶ¥X¨Ó¡A¦Ó·í¦¨¬O¤@¯ëªº¤å¦rÅã¥Ü¥X¨Ó¡A³o¥u¬O¤@­Ó¹w¨¾±¹¬I¡C


in.asp
  1. <%
  2. '«Ø¥ß¸ê®Æ®w³sµ²ª«¥ó
  3.         Set conobject = Server.CreateObject("ADODB.Connection")
  4.         DBPath = Server.MapPath("question.mdb")
  5. '³sµ²¸ê®Æ®w       
  6.         conobject.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ="&DBPath
  7. '«Ø¥ß¸ê®Æ®w¦s¨úª«¥ó       
  8.         Set RS=Server.CreateObject("ADODB.Recordset")
  9. '¥´¶}¸ê®Æªí       
  10.         RS.Open "Select * From question Order By ÃD¸¹",conobject,1,3
  11. %>

  12. <HTML>
  13. <H2 align="center"><font size="2">
  14. <img border="0" src="asktitle.gif"></font></h2>
  15. <FORM Action=sentmsg.asp Method=post>
  16. <font size="2">
  17. ®aªø©m¦W<INPUT Type=Text Name=Name>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E-Mail<INPUT Type=Text Name=email>
  18. </font>
  19. <HR size="1" color="#0000FF">
  20. <font size="2">
  21. <%
  22. While Not rs.EOF
  23. %>
  24.   <B><%=rs("ÃD¸¹")%>. <%=Server.HTMLEncode(rs("ÃD¥Ø"))%></B><BR>  
  25. <%  
  26.    If rs("ÃD«¬") = "¿ï¾Ü" Then  
  27.     For I = 1 To 3
  28. %>     
  29. <INPUT Type=Radio Name=No<%=rs("ÃD¸¹")%>
  30. Value=<%= rs("¿ï¶µ" & I) %>><%=Server.HTMLEncode(rs("¿ï¶µ" & I))%><BR>     
  31. <%   
  32.     Next   
  33.     Else   
  34. %>        
  35.    <INPUT Type=Text Name=No<%=rs("ÃD¸¹")%>><BR>   
  36. <%     
  37.     End If   
  38.   rs.MoveNext   
  39. Wend   
  40. %>   
  41. <INPUT Type=Submit Value="°e¥X°Ý¨÷">   
  42. </font>   
  43. </FORM>   
  44. </HTML>
½Æ»s¥N½X
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

¦Û°Ê°e«Hµ{¦¡
·í°Ý¨÷¶ñ¼gªÌ¦bin.aspµ{¦¡ºô­¶¤¤«ö¤U¡y°e¥X°Ý¨÷¡z«ö¶s«á¡Aªí³æ¤¤ªº¸ê®Æ´N·|°e¥æ¦Û°Ê°e«Hµ{¦¡sentmsg.asp³B²z¡Asentmsg.aspµ{¦¡±N·|§â°Ý¨÷¶ñ¼gµ²ªG»P¶ñ¼gªÌªº¸ê®Æ¥HE-Mail¦Û°Ê¶Ç°eªº¤è¦¡±H°e¦ÜºÞ²zªÌ©Î¬O°Ý¨÷½Õ¬d¥D«ù¤Hªº¤â¤¤¡C

¡@¦b«H¥ó¶Ç°e¤§«e¡A§Ú­Ì¥²¶·¥ý³]©wCDONTS.NewMailª«¥óªº¦¬¥ó¤H(To)¡B±H¥ó¤H(From)¡B«H¥ó¥D¦®(Subject)»P«H¥ó¤º®e(Body)µ¥¥|¶µÄÝ©Ê¡A«H¥ó¥D¦®§Ú­Ì¥i¥H¦Û¦æ³]©w¬°©T©w¤å¦r¡A¦¬¥óªÌ«h¬°ºÞ²zªÌ©Î¬O°Ý¨÷½Õ¬d¥D«ù¤HªºE-Mail±b¸¹(³o¤]¬O©T©wªº)¡A«H¥ó¶Ç°eªº±H¥óªÌ»P«H¥ó¤º®e(°Ý¨÷µ²ªG)«h¬OÀHµÛ°Ý¨÷¶ñ¼gªÌ©Ò¶ñ¼gªº¤º®e¦ÓÅÜ°Ê¡C



¡@½ÐÆ[¹î¤W¹Ï³o¬qµ{¦¡±Ô­z¡A§A¥i¥H²M·¡ªº¬Ý¨ì§Ú­ÌFrom(±H¥óªÌ¶l¥ó«H½c)ÄݩʭȬO³]©w¬°¡G°Ý¨÷¶ñ¼gªÌ¦bin.aspµ{¦¡ºô­¶¤¤EmailÄæ¦ì¤¤©Ò¶ñ¼gªº¶l¥ó«H½c¡A³o»ò°µ³Ì¥D­nªº¥Øªº¬O¬°¤FÅýºÞ²zªÌ©Î¬O°Ý¨÷½Õ¬d¥D«ù¤H¯à°÷§Y®Éªº¥HE-Mail¤è¦¡¦^À³°Ý¨÷¶ñ¼gªÌ©Ò´£¥Xªº·N¨£¡C

ª`·N
¥»½d¨Ò¤¤From(±H¥óªÌ¶l¥ó«H½c)»PTo(¦¬¥óªÌ¶l¥ó«H½c)Äݩʭȳ]©w¬O¬Û¦Pªº¡A¤]´N¬O¦Û¤v±H«Hµ¹¦Û¤v¡A¦b¹ê»ÚÀ³¥Î®É½Ð¦Û¦æ§ó§ïTo(¦¬¥óªÌ¶l¥ó«H½c)Äݩʭȳ]©w¡C
¦b«H¥ó¤º®eªº³¡¤À¡A°£¤F­n¦³°Ý¨÷¶ñ¼gªÌ©Ò¿ï¾Üªºµª®×»P·N¨£¥~¡A¥»½d¨Ò¤¤ÁÙ¥[¤W¬Û¹ïÀ³ªº°Ý¨÷ÃD¥Ø¥»¤å¡A¦pªG¤£¥[¤W­ì©lÃD¥Øªº¤º®e¡A§Ú­Ì«ç¯àª¾¹Dµª®×ªº·N¸q¡H

9-30.png

  • ¨Ï¥ÎWhile - Wend °j°é±Ô­z°t¦X§ïÅܧ@¥Î¤¤¸ê®Æ¿ý¦ì¸mªºMoveNext¤èªk¡A±N©Ò¦³ªº°Ý¨÷ÃD¥Ø¦Û¸ê®Æ®w¸ê®Æªí¤¤Åª¨ú¥X¨Ó¡C
  • §Q¥ÎRequest¤èªk±Ô­z¨ú±o¨Ó¦Û°Ý¨÷µ{¦¡ºô­¶¤¤¬Û¹ï©óÃD¥Øªºµª®×Äæ¦ìÄÝ©Ê­È(Value)¡C
  • ©I¥sSent¤èªk±N«H¥ó±H¥X¡C


      ª`·N
¤W¹Ïµ{¦¡½X¤¤ªºvbCrLf¬°¤@´«¦æ²Å¸¹¡A¨ä§@¥Î´N¬O±N§Ú­Ìªº«H¥ó¤º®e¤À¬qÅã¥Ü¡I­Y¥¼¥[¤W¦¹´«¦æ²Å¸¹¡A«h§Ú­Ìªº«H¥ó¤º®e±N·|¥þ³¡¦ê±µ¦¨¤@­Ó¬q¸¨¡C

sentmsg.asp
  1. <%
  2. '«Ø¥ß¸ê®Æ®w³sµ²ª«¥ó
  3.         Set conobject = Server.CreateObject("ADODB.Connection")
  4.         DBPath = Server.MapPath("question.mdb")
  5. '³sµ²¸ê®Æ®w       
  6.         conobject.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ="&DBPath
  7. '«Ø¥ß¸ê®Æ®w¦s¨úª«¥ó       
  8.         Set RS=Server.CreateObject("ADODB.Recordset")
  9. '¥´¶}¸ê®Æªí       
  10.         RS.Open "Select * From question Order By ÃD¸¹",conobject,1,3
  11.        
  12.   '«Ø¥ß¶l¥ó±H°eª«¥ó       
  13. set mail=server.createobject("CDONTS.NewMail")
  14.         '¥H°Ý¨÷µ{¦¡ºô­¶¤¤©Ò¶ñ¼gªºE-mail¬°±H¥óªÌ
  15.     mail.From= Request("email")
  16.     '¦¬¥óªÌ¬°ºÞ²z­û©Î°Ý¨÷½Õ¬d¥D«ù¤HªºE-Mail
  17.     mail.To= Request("email")
  18.     '«H¥ó¥DÃD,³q±`¬°°Ý¨÷ªº¥DÃD
  19.     mail.subject="®aªø°Ý¨÷½Õ¬d"
  20.     '«H¥ó¤º®e
  21.     body = "®aªø" & Request("name") & "°Ý¨÷·N¨£¡G" & vbCrLf
  22. '¦C¥X°Ý¨÷ÃD¥Ø¤Î°Ý¨÷¶ñ¼gªÌªºµª®×
  23.     While Not rs.EOF
  24.      ans= Request("No" & rs("ÃD¸¹"))
  25.      
  26.      body = body & rs("ÃD¥Ø") & vbCrLf
  27.      body = body & ans & vbCrLf
  28.      rs.MoveNext
  29.      Wend
  30.     mail.body = body

  31.     ' ±H¥X«H¥ó
  32.     mail.send
  33. %>  
½Æ»s¥N½X
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

¸ê®Æ®wµ²ºc»Pµ{¦¡§Q¥Î
¥»½d¨Ò¤¤ªº¸ê®Æ®wÀÉ®×question.mdb¤¤¥u¦³¤@­Ó¸ê®Æªíquestion¡A¥Î¨Ó¦s©ñ§Ú­Ìªº°Ý¨÷ÃD¥Ø¤Î³Q¿ïµª®×(ÃD«¬¬°¿ï¾ÜÃD¤~¥Îªº¨ì)¡A¨äÄæ¦ìµ²ºc¦p¤U¹Ï¡G

9-31.png

µ{¦¡¨Ï¥Î»¡©ú

  • ¥»½d¨Òµ{¦¡¥i¨Ï¥Î¤§°Ý¨÷ÃD¥ØÃþ«¬¥u¦³¿ï¾ÜÃD»P°ÝµªÃD¨âºØ¡A§Q¥Î®É½Ðª½±µ©ó¸ê®Æ®w¡yÃD«¬¡zÄæ¦ì¤¤«ü©w§Y¥i¡C

    9-32.png

  • °Ý¨÷ÃD¥Ø¥iµL­­¼W¥[¡A­Y§A­n¼W¥[°Ý¨÷ªºÃD¥Ø¡Aª½±µ©ó¸ê®Æ®w¸ê®Æªí¤¤·s¼W¸ê®Æ§Y¥i¡C
  • ¿ï¶µÄæ¦ì¤]´N¬O¿ï¾ÜÃDªº³Æ¿ïµª®×¡A¹w³]¬°¤T­Ó³Q¿ï¶µ¥Ø¡A­Y±ý¼W´î¶µ¥Ø½Ð°O±o¦P®É§ó§ï°Ý¨÷µ{¦¡ºô­¶in.asp»P¦Û°Ê°e«Hµ{¦¡sentmsg.asp¤¤For°j°é±Ô­zªº²×¤î­È¡C
  • ½Ð°È¥²§ó§ï¦Û°Ê°e«Hµ{¦¡sentmsg.asp¤¤CDONTS.NewMailª«¥óªº¦¬¥ó¤H(To)ÄÝ©Ê­È¡A±N¨äÄݩʭȭקאּ¥¿½Tªº¦¬¥óªÌ¹q¤l¶l¥ó±b¸¹¡C


(¹ê¾Ô±MÃD) ºô¸ô°Ý¨÷ E-mai lª©§¹¾ã½d¨ÒÀ£ÁYÀÉ: EMAILASK.rar (100.3 KB)
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

¥»©«³Ì«á¥Ñ PD961A ©ó 2010-5-24 20:18 ½s¿è
§Q¥ÎE-mailªº¤è¦¡¶Ç°e¬ÛÃöºô­¶¸ê®Æªº½T¬O«D±`¨ã¦³¤¬°Ê©Ê¡A¦]¬°ºÞ²zªÌ©Î¬O°Ý¨÷½Õ¬d¥D«ù¤H¦¬¨ì¬ÛÃöªº°Ý¨÷¸ê®Æ ...
¤p»x µoªí©ó 2010-5-24 16:30



¤p»xª©¥D

±zªº´£¥Ü
CONDTS.NewMailª«¥ó¬O§Ú­Ì¦b¦w¸ËIIS®É¦³¤Ä¿ïSMTP Service¶µ¥Ø®É¤~·|³Q¦w¸Ë¶i¨t²Î¤¤¡A
¦pªG§A¨Ï¥ÎIIS¦ý¬O¦w¸Ë·í®É¨Ã¥¼¤Ä¿ïSMTP Service¶µ¥Ø¡A
«h²{¦b§A¥i¥H³z¹LIISªº·s¼W¡þ²¾°£¥\¯à¨Ó·s¼WSMTP Service¡C
¥H¥Ø«eªºXP¨t²Î(SP3)¥i¥H¦p¦¹³]©w¬O¨S¦³°ÝÃD.
°O±oWIN2000¨t²Î¨S¦³¦¹¶µ¥\¯à.

¥t¥~·Q½Ð°Ý±z
¤@¥xmail server ¤w³]©w¦¹¥\¯à¡A¥i¦A³]©w¥t¤@¥x mail server ¶Ü?
(²z½×¤WcdontsÀ³¸Ó¬O¤£¯à¦P®É³]¬Û¦PªºSMTP...)
ÁÂÁ±z!!

TOP

¦^´_ 6# PD961A


1.win2000 pro(¥H¤W)´N¦³smtpªA°È

2.¤@¥xmail server ¤w³]©w¦¹¥\¯à¡A¥i¦A³]©w¥t¤@¥x mail server ¶Ü?
²z½×§Ú¤£ÁA¸Ñ,¦ý¦b¹ê°È¤W§Ú¬O°µ¹L¨â¥x¦Pºô°ìªºSERVER¦U¦Û¦P®É¾Ö¦³SMTP¥B¥i¥¿±`µo«H
­«ÂI¬O·í®É¹êÅçÀô¹Ò¬O¨â¥xSERVER¦U¦³¨â±iºô¥d,¤@±i¹ï¤º°Ï°ìIP(intranet),¤@±i¹ï¥~¼s°ìIP(internet)
¤]´N¬O»¡¨â¥x¹ï¥~µo«H®É,¨Ï¥Îªº¬O¨â²Õ¤£¦P¹ï¥~ªºIP

­Y¥u¦³¤@­Ó¹ï¥~IP®É,«ç¿ì? ¨º´N¤@¥x³]©wSMTP¨Ã¾Ö¦³¹ï¥~IP<---³o¥x±H«H¤@©w¨S°ÝÃD
¨º¥t¤@¥x«ç¿ì? ¥ÎCDO.Message±H´N¦nÅo? «ç»ò±H?

°²©wª¬ªp
A¾÷:¨â±iºô¥d¤@±i¹ï¥~,¤@±i¹ï¤º<--³]¦³SMTP¥B¨Ï¥ÎCDONTS±H«H
B¾÷:¥u¦³¤@±iºô¥d,¨Ã§Q¥Î¦¹¥d»PA¾÷ºc¦¨°Ïºô<--·Q§Q¥ÎA¾÷ªºSMTP¨Ã¨Ï¥ÎCDO.Message±H«H
´«§Aµoªí¤@¤UÅo
¥u­n»¡©úB¾÷³¡¥÷§Y¥i
ÃD¥~¸Ü,¥H²{¦bªº¤¤µØ¹q«H¨Ó»¡,§Y¨Ï¤w¦³SMTP,¦ýSERVER¹ï¥~ªºIP¥²¶·¬°©T©wIP¤~¯àµo«H³á
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

¥»©«³Ì«á¥Ñ 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®×ªº³á!
MAILSEVER±M®×.gif

TOP

¦^´_  ¤p»x

¦ý¬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


µª®×§A¤w¸g¼g¥X¨Ó¤Fªü
  1. .Configuration(strCfg & "smtpserver") = "msa.hinet.net" ' SMTP Server
½Æ»s¥N½X
B¾÷¨Ï¥ÎCDO±H«H®É,±NSMTP Server«ü©w¬°A¾÷´N¦n¤F

½Ðª`·N ¦pªG¥~°e°T®§¬O±q¦P¤@³¡¾÷¾¹°e¨ì SMTP ¦øªA¾¹¡A¨º»ò¥u­n±Ä¥Î¡uÂà±µ¡v³\¥iÅvªº¹w³]³]©w´N¥i¥H¤F¡C¤£¹L¡A¦pªG°T®§¬O±q¥t¤@³¡¹q¸£¶Ç°eªº¸Ü¡A±z´N±o¦b³\¥iÅv²M³æ·í¤¤¡A¥[¤W¨º¤@³¡¹q¸£ªº IP ¦ì§}©Îºô°ì¦WºÙ¡A¤~¯à°õ¦æ¡uÂà±µ¡v¥\¯à¡C


Ãö©óSMTP»PCDO½Ð°Ñ¦Ò
http://forum.twbts.com/viewthread.php?tid=402&extra=page%3D2
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

        ÀR«ä¦Û¦b : ¤Hªº¤ß¦a¬O¤@²¥¥Ð¡A¤g¦a¨S¦³¼½¤U¦nºØ¤l¡A¤]ªø¤£¥X¦nªºªG¹ê¡C -
ªð¦^¦Cªí ¤W¤@¥DÃD