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

12-1-3 CONDTS.NewMailª«¥ó¶i¶¥ÄÝ©Ê

12-1-3 CONDTS.NewMailª«¥ó¶i¶¥ÄÝ©Ê

12-1-3   CONDTS.NewMailª«¥ó¶i¶¥ÄÝ©Ê

¦h¦¬¥óªÌ¡G
CONDTS.NewMailª«¥óªº¡uTo¡vÄݩʬO¥Î¨Ó³]©w¦¬¥óªÌ¡A¦ý¬O¦¬¥óªÌ¨Ã¤£­­©w¬O¤@¦ì¡A§Ú­Ì¥i¥H±N¦¬¥óªÌªº¶l¥ó¦a§}³s±µ¦b¤@°_¡A¦Ó¨C­Ó¶l¥ó¦a§}¶¡¥H¡u;¡v¤À¸¹¹j¶}§Y¥i¡A¨Ò¦p¡G
  1. //$CDONTS->To =±H¥óªÌ¶l¥ó¦a§};
  2. $CDONTS->To ="[email protected]¡F[email protected]";
  3. $CDONTS->Subject=«H¥ó¥D¦®;
  4. $CDONTS->Body=«H¥ó¤º®e;
½Æ»s¥N½X
°Æ¥»¦¬¥óªÌ¡G
­n±N«H¥ó°Æ¥»¶l±Hµ¹¨ä¥L¦¬¥óªÌ¥i¨Ï¥ÎCONDTS.NewMailª«¥óªº¡uCc¡vÄÝ©Ê¡A¦¬¥óªÌ¦P¼Ë¤£­­©w¬O¤@¦ì¡A§Ú­Ì¥i¥H±N¦¬¥óªÌªº¶l¥ó¦a§}³s±µ¦b¤@°_¡A¦Ó¨C­Ó¶l¥ó¦a§}¶¡¥H¡u;¡v¤À¸¹¹j¶}§Y¥i¡A¨Ò¦p¡G
  1. $CDONTS->From=±H¥óªÌ¶l¥ó¦a§};
  2. $CDONTS->To=¥¿¥»¦¬¥óªÌ;
  3. $CDONTS->Cc="[email protected]¡F[email protected]";
  4. $CDONTS->Subject=«H¥ó¥D¦®;
  5. $CDONTS->Body=«H¥ó¤º®e;
½Æ»s¥N½X
±K¥ó¦¬¥óªÌ¡G
­n±N«H¥ó°Æ¥»°½°½¦a¶l±Hµ¹¨ä¥L¦¬¥óªÌ¥i¨Ï¥ÎCONDTS.NewMailª«¥óªº¡uBcc¡vÄÝ©Ê¡A¥¿¥»¦¬¥óªÌ¡]To¡^©M°Æ¥»¡]Cc¡^¦¬¥óªÌ¤£·|¬Ý¨ì±K¥ó°Æ¥»¡]Bcc¡^Äæ¦ì¤¤ªº¶l¥ó¦a§}¡A¦ý¬O±K¥ó¦¬¥óªÌ¥i¥H²M·¡ªº¬Ý¨ì«H¥ó±H°eµ¹­þ¨Ç¥¿¥»¦¬¥óªÌ©M°Æ¥»¦¬¥óªÌ¡A±K¥ó¦¬¥óªÌ¦P¼Ë¤£­­©w¬O¤@¦ì¡A§Ú­Ì¥i¥H±N¦¬¥óªÌªº¶l¥ó¦a§}³s±µ¦b¤@°_¡A¦Ó¨C­Ó¶l¥ó¦a§}¶¡¥H¡u;¡v¤À¸¹¹j¶}§Y¥i¡A¨Ò¦p¡G
  1. $CDONTS->From=±H¥óªÌ¶l¥ó¦a§};
  2. $CDONTS->To=¥¿¥»¦¬¥óªÌ;
  3. $CDONTS->Cc=°Æ¥»¦¬¥óªÌ;
  4. $CDONTS->="[email protected]¡F[email protected]";
  5. $CDONTS->Subject=«H¥ó¥D¦®;
  6. $CDONTS->Body=«H¥ó¤º®e;
½Æ»s¥N½X
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

¦¬¥óªÌ¦WºÙ¡G
¦b§Ú­Ìª½±µ¥H¶l¥ó¦a§}±H°e«H¥ó®É¡A¦b¦¬¥óªÌ©Î¬O±H¥óªÌÄæ¦ì·|ª½±µ¥H¶l¥ó¦a§}Åã¥Ü¡A¦ý¦³®É­Ô§Ú­Ì¦¬ªº¨ì«H¥ó¤¤¡A¦¬¥óªÌ©Î¬O±H¥óªÌÄæ¦ì«oÅã¥Ü¼ÊºÙ©Î©m¦W¡A¨Ã¤£¬O¤@­Ó¶l¥ó¦a§}¡A¦pªG­n¥H¼ÊºÙ©Î©m¦W¥N´À¶l¥ó¦a§}¬°Åã¥Ü¤º®e¡A¥i¥H±N¶l¥ó¦a§}¥H¡u< >¡v¬A°_¨Ó¡A¨Ã©ó¡u< >¡v«e¤è©ñ¸m±z·QÅã¥Üªº¤å¦r¡A¨Ò¦p¡G
  1. $CDONTS->From=±H¥óªÌ¶l¥ó¦a§};
  2. $CDONTS->To=¡¨©~©ö<[email protected]>¡¨;
  3. $CDONTS->Subject=«H¥ó¥D¦®;
  4. $CDONTS->Body=«H¥ó¤º®e;
½Æ»s¥N½X
«H¥ó¶Ç»¼ªºÀu¥ýµ¥¯Å¡G
·í§Ú­Ì¦¬¨ì¶l¥ó®É¡A­Y¦b«H¥ó¦Cªí¤¤¶l¥ó¶µ¥Ø«e¤è¦³¤@­Ó¬õ¦âÅå¹Ä¸¹¡A¥Nªí¦¹«H¥ó¬°Àu¥ý³B²z¹ï¶H¡A­Y¬O¥X²{¤@­ÓÂŦâ¦V¤U½bÀY¡A¥Nªí¦¹«H¥ó¬°«D¥²­n³B²z¹ï¶H¡A¦pªG¤°»ò²Å¸¹³£¨S¦³¡A¨º´N¬O¤@¯ë³B²z¶¶§Çªº¶l¥ó¡A¦Ó³o­ÓÀu¥ý³B²zÅv¦b¨Ï¥Î¦¬µo«H¥ó³nÅé®É´N¥i³]©w¡A¨Ò¦p¡uOutlook Express¡v¡G

¹Ï12-12   ³]©w¶l¥ó³B²zµ¥¯Å¡C

¦b§Ú­Ìµ{¦¡¤¤­n³]©w¶l¥ó³B²zµ¥¯Å¥i³z¹LCONDTS.NewMailª«¥óªº¡uImportance¡vÄݩʨӳ]©w¡A¨äÄݩʭȦ³¤TºØ¡G

  • High¡]2¡^¡G±N«H¥ó¦C¬°³Ì¥ý³B²z¡A¤]´N¬O¾Ö¦³°ªÀu¥ýÅv¡C
  • Low¡]0¡^¡G±N«H¥ó¦C¬°³Ì«á³B²z¡A¤]´N¬O¾Ö¦³§CÀu¥ýÅv¡C
  • Normal¡]1¡^¡G±N«H¥ó¦C¬°¤@¯ë³B²zµ¥¯Å¡A¤]´N¬O¾Ö¦³¤@¯ëÀu¥ýÅv¡C
¨Ò¦p¡G
  1. $CDONTS->From=±H¥óªÌ¶l¥ó¦a§};
  2. $CDONTS->To=¦¬¥óªÌ¶l¥ó¦a§};
  3. $CDONTS->Subject=«H¥ó¥D¦®;
  4. $CDONTS->Body=«H¥ó¤º®e;
  5. $CDONTS->Importace= 2;
½Æ»s¥N½X
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

§¨±aªþ¥ó
·í§Ú­Ì¦¬¨ì¶l¥ó®É¡A­Y¦b«H¥ó¦Cªí¤¤¶l¥ó¶µ¥Ø«e¤è¦³¤@­Ó°j¯¾°w²Å¸¹¡A¥Nªí¦¹«H¥ó¦³ªþ¥[¤å¥ó©ÎÀɮסG

¹Ï12-13  §¨±aÀɮתº¶l¥ó¡C

¦pªG­nªþ¥[Àɮרì¶l¥ó¤¤¡A¥i¨Ï¥ÎCONDTS.NewMailª«¥óªº¡yAttachFile¡z¤èªk¡G
  1. Mymail.AttachFile(Source [,FileName] [,EncodingMethod])
½Æ»s¥N½X
§¨±aªºªþ¥óÀÉ®×¥²¶·¬O¥»¾÷ªº¹êÅé¸ô®|¡A¨Ò¦p¡G
  1. $CDONTS->From=±H¥óªÌ¶l¥ó¦a§};
  2. $CDONTS->To=¦¬¥óªÌ¶l¥ó¦a§};
  3. $CDONTS->Subject=«H¥ó¥D¦®;
  4. $CDONTS->Body=«H¥ó¤º®e;
  5. $CDONTS->AttachFile(¡§charles.jpg¡¨);
½Æ»s¥N½X
«H¥ó¤º®e®æ¦¡¡G
²{¦bªº¶l¥ó¦¬µo³nÅé³£¤w¸g¨ã³ÆÅã¥ÜHTML®æ¦¡¤º®e«H¥óªº¯à¤O¡A¦]¦¹¡A§Ú­Ìµo«Hªº¤º®e¤]¥i¥H¥ÎHTML¼ÐÅÒ¨Ó¼¶¼g¡C
­Y­n±N«H¥ó¤º®e¥HHTML®æ¦¡±H¥X¡A¥²¶·³]©wCONDTS.NewMailª«¥óªº¡uBodyFormat¡v»P¡uMailFormat¡vÄÝ©Ê¡A¡uBodyFormat¡vÄݩʭȦ³¨âºØ¡G

  • Html¡]0¡^¡G±N«H¥ó¤º®e¥HHTML®æ¦¡±H°e¡C
  • Text¡]1¡^¡G±N«H¥ó¤º®e¥H¯Â¤å¦r®æ¦¡±H°e¡A¦¹¬°¡uBodyFormat¡vÄݩʪº¹w³]­È¡C

¡uMailFormat¡v­È¤]¦³¨âºØ¡G

  • 0¡G±N¶l¥ó¥HMIME®æ¦¡±H°e¡C
  • 1¡G±N¶l¥ó¥H¤å¦r®æ¦¡±H°e¡A¦¹¬°¹w³]­È¡C
©Ò¥H¡A­Y±z­n±H°eHTML®æ¦¡ªº«H¥ó¡A¡uBodyFormat¡v»P¡uMailFormat¡vÄݩʭȳ£­n³]¬°¡y0¡z¡C
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

¹ê°µ¾Ç²ß¡G
½Ð¥H½d¨Òcdontssent.php¬°°ò¦¡A¥[¤Jªí³æ³æ¿ï«ö¶s¤¸¥ó¡AÅý¨Ï¥ÎªÌ¿ï¾Ü¥HHTML®æ¦¡±H°e«H¥ó©Î¯Â¤å¦r±H°e«H¥ó¡A¥»¹ê°µ¾Ç²ß¤£´£¨Ñµ{¦¡¸Ñ»¡¡A¦C¥X¤§µ{¦¡ºô­¶µe­±»P½d¨Òµ{¦¡½X¬Ò¬°°Ñ¦Ò¡A½Ð±z¥H¦Û¤vªº¤è¦¡§¹¦¨¥»¹ê°µ¾Ç²ß¡I

¹Ï12-14   µ{¦¡°õ¦æµ²ªG¡C

htmlsent.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. //§PÂ_®æ¦¡
  12.   if ($_REQUEST["mailselect"]=="html")
  13.      {               
  14.         $CDONTS->BodyFormat=0;
  15.         $CDONTS->MailFormat=0;
  16.       }
  17. //°e¥X«H¥ó
  18. $CDONTS->Send();
  19. ?>

  20. <html>
  21. <head>
  22. <meta http-equiv="Content-Type" content="text/html; charset=big5">
  23. <title>·PÁ±zªº·N¨£!!</title>
  24. </head>
  25. <body>
  26. ·PÁ±zªº·N¨£
  27. </body>
  28. </html>
  29. <?
  30. }
  31. else
  32. {
  33. ?>
  34. <html>
  35. <head>
  36. <meta http-equiv="Content-Type" content="text/html; charset=big5">
  37. <title>·N¨£¦^õX</title>
  38. </head>
  39. <div align=center><center>
  40. <table border=1 bordercolordark=#FFFFFF cellspacing=0 cellpadding=0 bordercolorlight=#800000 bordercolor=#800000>
  41. <tr><td width=100% bgcolor=#800000>
  42. <form method=POST style="margin-top: 0; margin-bottom: 0">
  43. <table border=1 bordercolorlight=#800000 cellspacing=0 cellpadding=0 bordercolordark=#FFFFFF bordercolor=#FFFFFF>
  44. <tr><td width=22% bgcolor=#000080>
  45. <font color=#FFFFFF size=2>±H¥óªÌEMAIL</font></td>
  46. <td width=78% ><input type=text name=mailfrom size=46></td></tr>
  47. <tr><td width=22% bgcolor=#000080>
  48. <font color=#FFFFFF size=2>«H¥ó¥D¦®</font></td>
  49. <td width=78% ><input type=text name=mailsubject size=46></td></tr>
  50. <tr><td width=22% bgcolor=#000080>
  51. <font color=#FFFFFF size=2>«H¥ó¤º®e</font></td>
  52. <td width=78% ><textarea rows=6 name=mailtext cols=45></textarea></td></tr>
  53. <tr><td width=100% colspan=2 bgcolor="#F4EAEA">
  54.   <input type="radio" value="html" name="mailselect">HTML®æ¦¡
  55.   <input type="radio" value="txt" name="mailselect">¯Â¤å¦r®æ¦¡</td></tr>
  56. <tr><td width=100% colspan=2><p align=center>
  57. <input type=submit value=°e¥X name=ord></td></tr>
  58. </table></form>
  59. </td>
  60. </tr></table></center></div>
  61. </body>
  62. </html>
  63. <?
  64. }
  65. ?>
½Æ»s¥N½X
·í¿ï¾ÜHTML®æ¦¡±H°e«H¥ó®É¡A«h±NÀò±o¤U¹Ï¤§«H¥ó¤º®e¡G

¹Ï12-15  HTML®æ¦¡«H¥ó¡C

·í¥»½d¨Ò¿ï¾Ü¯Â¤å¦r®æ¦¡±H°e«H¥ó®É¡A±NÀò±o¤U¹Ï¤§«H¥ó¤º®e¡G

¹Ï12-16   ¯Â¤å¦r®æ¦¡«H¥ó¡C
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

        ÀR«ä¦Û¦b : °ß¨ä´L­«¦Û¤vªº¤H¡A¤~§ó«i©óÁY¤p¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD