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

12-1-2 ¥HCODNTS.NewMailª«¥ó±H°eEmail

12-1-2 ¥HCODNTS.NewMailª«¥ó±H°eEmail

12-1-2   ¥HCODNTS.NewMailª«¥ó±H°eEmail
·Q­n¦³CODNTS.NewMailª«¥ó¨Ó¶Ç°e«H¥ó¡A¥²¶·¬O¦b¦w¸ËIIS®É¦P®É¦w¸ËSMTP Service¡ACODNTS.NewMailª«¥ó¤~·|¦w¸Ë¨ì¨t²Î¤¤¡A¦pªG±zÁÙ¨S¦w¸ËSMTP Service¡A»°§Ö¥´¶}¡u±±¨î¥x¡v->¡u·s¼W©Î²¾°£µ{¦¡¡v->¡u·s¼W/²¾°£Windows¤¸¥ó¡v¡A¥h·s¼W¡uInternet Information Services (IIS)¡v¶µ¥Øªº¤l¦w¸Ë¶µ¥Ø¡uSMTP Service¡v¡A¦p¤U¹Ï¡G

¹Ï12-5  ¦w¸Ë¡uSMTP Service¡v¡C

¦w¸Ë¤u§@§¹¦¨«á¡AÂI¿ï¡u±±¨î¥x¡v¤¤ªº¡u¨t²ÎºÞ²z¤u¨ã¡v¶µ¥Ø¡A¦b¥X²{ªº¡u¨t²ÎºÞ²z¤u¨ã¡vµøµ¡¤¤ÂIÀ»¡uInternet Information Services¡v¶µ¥Ø¡A¦b¡uInternet Information Services¡vµøµ¡¤¤¡A¦pªG¦³¬Ý¨£¡u¹w³]SMTPµêÀÀ¦øªA¾¹¡v¶µ¥Ø¡A´Nªí¥Ü¦w¸Ë¦¨¥\¤F¡A§Ö«ö¤U¤u¨ã¦C¤Wªº¡u±Ò°Ê¦øªA¾¹¡v«ö¶s¡AÅýSMTP Server¶}©l¹B§@¡A¤d¸U§O§Ñ¤F¡G

¹Ï12-6   ¹w³]SMTPµêÀÀ¦øªA¾¹¡C
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

µ§ªÌ¥H«eªº§@·~¥­¥x¬OWindows 2000 Professional¡Aºô­¶¦øªA¾¹ªºª©¥»¬°IIS 5.0¡A¦pªG±z²{¦bªº§@·~¨t²Î¤]¬O¡A®¥³ß±z¡I¤w¸g¥i¥H¶}©lCODNTS.NewMailª«¥ó¤F¡C

µ§ªÌ²{¦b¨Ï¥Îªº§@·~¨t²Î¬°Windows XP Professional¡A¦pªG±z²{¦b¨Ï¥Îªº§@·~¨t²Î¤]¬OWindows XP Professional¡A¨º»ò¡A§Y¨Ï±z¤w¸g¦w¸ËSMTP Server¡A«Ü©êºp¡I±zÁÙ¬O¨S¦³CODNTS.NewMailª«¥ó¥i¥H¨Ï¥Î¡I¬°¦ó¡H¦]¬°Windows XP ProfessionalªºIISª©¥»¬°5.1¡AIIS5.1ª©¥»¬O¨S¦³CODNTS.NewMailª«¥ó¥i¥Îªº¡]§Y¨Ï±z¬O¤w¸g¦w¸ËSMTP Server¤]¤£·|¦³¡^¡C

«ç»ò¿ì©O¡HCODNTS.NewMailª«¥óªº¹êÅéÀɮ׬°¡ycdonts.dll¡z¡A¥¦¬O¤@­Ó¥i¥H¥~±¾ªºActive DLL¤¸¥ó¡Aµ§ªÌ¤w¸gÀ°±z·Ç³Æ¦n¤F³o­ÓÀɮסA©ñ¦b½d¨Ò¥úºÐ\ch12ªº¥Ø¿ý¤U¡A½Ð§â¡ycdonts.dll¡z«þ¨©¨ì±zµwºÐ¤¤ªºwindows\system32¥Ø¿ý¤U¡A§Ú­Ì§â¥¦µù¥U¨ì¹q¸£¤¤´N¦³CODNTS.NewMailª«¥ó¥i¥Î¤F¡I
CDONTS.DLL (393.27 KB)

1¡BÂI¿ï¡u¶}©l¡vÁä¡A¿ï¨ú¡u°õ¦æ¡v©R¥O¶µ¥Ø¡A©ó¡u°õ¦æ¡vµøµ¡¤¤ªº¡u¶}±Ò¡vÄæ¦ì¸Ì¿é¤J¡G
  1. regsvr32 \windows\system32\cdonts.dll
½Æ»s¥N½X
¦p¤U¹Ï©Ò¥Ü¡G
2.png
¹Ï12-7  µù¥U¤¸¥ó¡C

2.¿é¤J§¹²¦«á¡A«ö¤U¡u°õ¦æ¡vµøµ¡¤¤ªº¡u½T©w¡v¡A¦p¥X²{¤U¹Ïµe­±¡A´Nªí¥Ü¤¸¥óµù¥U¦¨¥\¡A§Ú­Ì¦³CODNTS.NewMailª«¥ó¥i¨Ï¥Î¤F¡I
3.png
¹Ï12-8   ¤¸¥óµù¥U¦¨¥\¡C
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

¤£ºÞ±z§@·~¨t²Î¬OWindows 2000 Professional¡]IIS5.0¡^©Î¬OWindows XP Professional¡]IIS5.1¡^¡A²{¦b³£¥i¥H¨Ï¥ÎCODNTS.NewMailª«¥ó¨Ó±H°e¶l¥ó¤F¡A²{¦bµ§ªÌ´N¨Ó»¡©ú¦p¦ó¨Ï¥ÎCODNTS.NewMailª«¥ó±H°e«H¥ó¡G

1.­n¦³EMail¶Ç°eªº¥\¯à¡A¥²¶·¥ý«Ø¥ßCODNTS.NewMailª«¥ó¡A«Ø¥ß¤è¦¡¦p¤U¹Ï©Ò¥Ü¡G

¹Ï12-9

2.§Ú­Ì±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
  1. $CDONTS = new COM("CDONTS.NewMail");
  2. $CDONTS->From = "±H¥ó¤HEMail ";
  3. $CDONTS->To = "¦¬¥ó¤HEMail ";
  4. $CDONTS->Subject = "«H¥ó¥D¦®";
  5. $CDONTS->Body = "«H¥ó¤º®e";
½Æ»s¥N½X
3.·í§Ú­Ì³]©w¦nCONDTS.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¥s¡ySend¡z¤èªk¡G
  1. $CDONTS->Send(); //¦p¦P§Ú­Ì«ö¤U¶Ç°e«ö¶s
½Æ»s¥N½X
«Ü²M·¡¤F³á¡I²{¦b¦P¼Ë¨Ó»s§@¤@­Óªí³æ±H«Hµ{¦¡¡A·í§Ú­Ì¦b¶ñ¼g«H¥ó¤º®e®Éµe­±¦p¤U¹Ï¡G

¹Ï12-10   cdontssent.php¡G¶ñ¼g«H¥ó¤º®e¡C

·í§Ú­Ì«ö¤Uªí³æ¤¤ªº¡u°e¥X¡v«ö¶s«á¡Aªí³æ¸ê®Æ°eµ¹cdontssent.phpµ{¦¡¦Û¤v³B²z¡A±N«H¥ó°e¥X«áµe­±¦p¤U¹Ï¡G

¹Ï12-11  cdontssent.php¡G«H¥ó°e¥X«á¡C
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

cdontssent.php
  1. <?
  2. if (isset($_REQUEST["ord"]))
  3. {
  4. //«Ø¥ß«H¥ó¶Ç°eª«¥ó
  5. $CDONTS = new COM("CDONTS.NewMail");
  6. //¨ú±o¶ñ¼gªº¸ê®Æ
  7. $CDONTS->To="[email protected]"; //§ï¦¨±z¦Û¤vªºMAIL
  8. $CDONTS->From=$_REQUEST["mailfrom"];
  9. $CDONTS->Subject=$_REQUEST["mailsubject"];
  10. $CDONTS->Body=$_REQUEST["mailtext"];
  11. //°e¥X«H¥ó
  12. $CDONTS->Send();
  13. ?>

  14. <html>
  15. <head>
  16. <meta http-equiv="Content-Type" content="text/html; charset=big5">
  17. <title>·PÁ±zªº·N¨£!!</title>
  18. </head>
  19. <body>
  20. ·PÁ±zªº·N¨£
  21. </body>
  22. </html>
  23. <?
  24. }
  25. else
  26. {
  27. ?>
  28. <html>
  29. <head>
  30. <meta http-equiv="Content-Type" content="text/html; charset=big5">
  31. <title>·N¨£¦^õX</title>
  32. </head>
  33. <div align=center><center>
  34. <table border=1 bordercolordark=#FFFFFF cellspacing=0 cellpadding=0 bordercolorlight=#800000 bordercolor=#800000>
  35. <tr><td width=100% bgcolor=#800000>
  36. <form method=POST action="<?=$_SERVER["PHP_SELF"];?>" style="margin-top: 0; margin-bottom: 0">
  37. <table border=1 bordercolorlight=#800000 cellspacing=0 cellpadding=0 bordercolordark=#FFFFFF bordercolor=#FFFFFF>
  38. <tr><td width=22% bgcolor=#000080>
  39. <font color=#FFFFFF size=2>±H¥óªÌEMAIL</font></td>
  40. <td width=78% ><input type=text name=mailfrom size=46></td></tr>
  41. <tr><td width=22% bgcolor=#000080>
  42. <font color=#FFFFFF size=2>«H¥ó¥D¦®</font></td>
  43. <td width=78% ><input type=text name=mailsubject size=46>
  44. </td></tr>
  45. <tr><td width=22% bgcolor=#000080>
  46. <font color=#FFFFFF size=2>«H¥ó¤º®e</font></td>
  47. <td width=78% >
  48. <textarea rows=6 name=mailtext cols=45></textarea>
  49. </td></tr>
  50. <tr><td width=100% colspan=2><p align=center>
  51. <input type=submit value=°e¥X name=ord></td></tr>
  52. </table></form>
  53. </td>
  54. </tr></table></center></div>
  55. </body>
  56. </html>
  57. <?
  58. }
  59. ?>
½Æ»s¥N½X
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

        ÀR«ä¦Û¦b : ª¾ÃÑ­n¥Î¤ßÅé·|¡A¤~¯àÅܦ¨¦Û¤vªº´¼¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD