ÅäÖÃphp×Ô´øµÄmail¹¦ÄÜ
֮ǰŪphpµÄʱºò£¬ÐèҪ¼ÖÆÆÁÄ»£¬¾ÍÊÇÓÃphp×Ô´øµÄemailº¯Êý·¢ÐÅ£¬ÒòΪûÓÐ×Ô¼ºÅª¹ýsmtpµÄ ·þÎñÆ÷£¬ÍøÉÏÌṩµÄsmtp·þÎñÆ÷¶¼ÊÇÐèҪʹÓÃÃÜÂëÈÏÖ¤ µÄ£¬Æ«Æ«phpÄÚÖõĺ¯Êý¾ÍûÓÐÌṩÉí·ÝÈÏÖ¤£¬Ò²¾Íµ¼ÖÂÁ˱ØÐëÐèÒªÔÚ×Ô¼ºµÄµçÄԴһ¸ö¿ÉÒÔ×ÔÖ÷·¢ÐŵÄmail·þÎñÆ÷£¡
È»ºó¾Í²»¶ÏµÄ°Ù¶Ègoogle£¬ÒòΪ×Ô¼ºÃ»ÓйâÇý£¬ËùÓоÍûÓÐÅäÖÃ΢Èí×Ô´øµÄsmtp·þÎñ£¬Ö»ÄÜÊÇÉÏÍøÕÒÄÇÖÖרÃÅ·¢ÐŵÄÈí¼þ£¬¸Õ¿ªÊ¼ÕÒµÄÊÇwebmail£¬µ«ÊDz»ÖªµÀÔõôÅäÖã¬Õâ·½ÃæÍøÉϽéÉܵIJ»¶à£¬ËùÒÔ·ÅÆúÁË£¬Ö±µ½Ëѵ½Ò»Î»ÍøÉϸçÃÇ·ÖÏíµÄ
===========ÓÃwinwebmailÅäÖÃphp×Ô´øµÄmail¹¦ÄÜ
mail()ÊÇPHP×Ô´øµÄÒ»¸öʹÓÃSMTP·þÎñ·¢ËÍÓʼþµÄº¯Êý£¬ÏÂÃæÊÇÕâ¸öº¯ÊýµÄÔÐÍ[color=#007700]
[/color][code]mail(wvidc@qq.com, "ûÓÐÖ÷Ìâ", $message, "from: someone@cc5f.cn\nReply-To: reply@cc5f.cn\nX-Mailer: PHP/" . phpversion()); [/code]
ÉèÖúúó²âÊԻᱨ´í:[color=#ff0000]
SMTP server response: 554 failed MAIL from verification with the from field in message header.[/color]
×Ô¼º²âÊԵİ汾ÊÇPHP5.x £¬ÐèÒªÕâÑù²ÅÄÜ·¢Ëͳɹ¦,Ó¦¸ÃÊÇSMTP·þÎñÆ÷µÄÎÊÌ⣬
[code]mail(wvidc@qq.com, "ûÓÐÖ÷Ìâ", $message, phpversion()); [/code]
֮ǰÔÚÍøÉÏÕÒÁËÏ£¬phpºÍwinwebmail´îÅäµÄºÜÉÙ,¶øÇÒÓÃphp£¬¾Í²»ÄÜʹÓÃÆóÒµÓʾ֡£
ÎÒµÄwinwebmai°æ±¾ÊÇ3.7.6.X £¬ÅäÖÃÇé¿ö¶¼»¹ÊDz¶à£¬Ìí¼ÓÏàÓ¦µÄÓû§£¬
ÔÚÊÕ·¢¹æÔòÑ¡ÏÀïÔÚ½øÐмòµ¥µÄÉèÖÃ:(Ч¹ûͼ)
[attach]834[/attach]
ÔÚSMTPÑéÖ¤IPÀýÍâÀïÌîÉÏ×Ô¼ºµÄIP¡£
ÕâÑùPHP¾ÍÄÜÕý³£µÄÁ¬½Óµ½SMTP·þÎñÆ÷£¬ÓÖ²»»á¸ÉÈŵ½ÆäËûwebmailµÄÓû§¡£
php.iniµÄÉèÖÃ:
[code]
[mail function]
; For Win32 only.
SMTP = 222.***.**.***
smtp_port = 25
; For Win32 only.
sendmail_from = mail@cc5f.cn
;display_errors =Off
£»²âÊÔµÄʱºò×îºÃ¸ÄΪOn£¬»ØÏÔ´íÎó
[/code]
PHP²âÊÔ´úÂë:
[code]
<?php $to = 'wvidc@qq.com';
$subject = 'subject';
$message = 'hello';
$headers = phpversion();
if(mail($to, $subject, $message,$headers)){
echo "Ok.";
}else{
echo "Fail.";
}
?>
[/code]
[color=#ff0000]SMTP server response: 554 failed MAIL from verification with the from field in message header.[/color]
winwebmailÕâ¸ö´íÎóÐèÒª¹Ø±ÕÊÕ·
Ïà¹ØÎĵµ£º
ÕâÖÖÎÊÌâÎÒÏë´ó¼Ò¿ÉÄܶ¼Óöµ½¹ý£¬ÍøÓÑÌṩµÄ½â¾ö·½·¨Ò²ºÜ¶à¡£ÎÒÒ²Ö»ÊǽáºÏ×Ô¼ºÏµÍ³µÄÐèÇó²¢½áºÏÍøÓѵĽâ¾ö·½°¸À´×ܽáµÄÒ»ÖÖ·½·¨
ÓÃÀ´×÷Ϊ½â¾öphpÒÔrootȨÏÞÖ´ÐÐһЩÆÕͨÓû§²»ÄÜÖ´ÐеÄÃüÁî»òÓ¦ÓõIJο¼¡£
ÆäʵphpÀïµÄpopen()º¯ÊýÊÇ¿ÉÒÔ½â¾öÕâ¸öÎÊÌâµÄ£¬µ«ÊÇÓÉÓÚijЩ°æ±¾µÄlinux(ÈçÎÒʹÓõÄCentos 5)¶Ôϵͳ°²È«µÄ¿¼ÂÇ£¬
ʹ ......
ÔÀ´ÊÇѧjspµÄ£¬µ«ÊǸоõjspÌ«ÄÑÁË£¬¶øÇÒ·¢ÏÖ£¬ÏÖÔڱȽÏÁ÷ÐÐphpÁË£¬php+mysqlµÄ»Æ½ð´îµµ¡£
¿´jspµÄÊéʱ£¬ÊéÉÏ˵£¬jsp±ÈphpºÃ£¬ÏÖÔÚ¿´phpµÄÊ飬˵php±ÈjspºÃ£¬ÎÒÏëÕâÒ²ÊÇÖÇÕß¼ûÖÇ£¬ÈÊÕß¼ûÈÊ°É¡£
ÇìÐÒ×Ô¼ºÑ§php·¢ÏÖÁËÒ»±¾ºÃÊ飬ÍƼö¸ø´ó¼Ò£¬¾ÍÊǽ²µÄºÜÏêϸ¡£
Ó¢ÎÄÃû¡¶PHP and MySQL EXAMPLE¡· ÃÀ¹ ......
×¼±¸ÖªÊ¶£º
Ubuntu :
Ubuntu ÊÇlinuxµÄÒ»¸ö°æ±¾£¬ÓзÇÖÞ·¢²¼µÄ£¬ÏÖÔڱȽÏÁ÷ÐеÄÒ»¸ö°æ±¾¡£
²Î¿¼°Ù¶È˵Ã÷Ubuntu
nginx ¡¡£º
Nginx ("engine x") ÊÇÒ»¸ö¸ßÐÔÄÜµÄ HTTP ºÍ ·´Ïò´úÀí ·þÎñÆ÷£¬Ò²ÊÇÒ»¸ö IMAP/POP3/SMTP ´úÀí·þÎñÆ÷¡£ Nginx ÊÇÓÉ Igor Sysoev Ϊ¶íÂÞ˹·ÃÎÊÁ¿µÚ¶þµÄ Rambler.ru Õ¾µã¿ ......
HTML´úÂë
<form action="" method="post">
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="1"/>
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="2"/>
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="3"/>
<input name="ID_D ......