Warning: array_keys() [
function.array-keys]: The first argument should be an array in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
1904
Warning: Invalid argument supplied for foreach() in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
1904
Warning: Invalid argument supplied for foreach() in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
2257
Warning: Invalid argument supplied for foreach() in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3206
Warning: implode() [
function.implode]: Argument must be an array in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3258
Warning: array_keys() [
function.array-keys]: The first argument should be an array in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3289
Warning: Invalid argument supplied for foreach() in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3289
Warning: array_keys() [
function.array-keys]: The first argument should be an array in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3332
Warning: Invalid argument supplied for foreach() in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3332
Warning: array_keys() [
function.array-keys]: The first argument should be an array in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3477
Warning: Invalid argument supplied for foreach() in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3477
Warning: array_keys() [
function.array-keys]: The first argument should be an array in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
1904
Warning: Invalid argument supplied for foreach() in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
1904
Warning: Invalid argument supplied for foreach() in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
2257
Warning: Invalid argument supplied for foreach() in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3206
Warning: implode() [
function.implode]: Argument must be an array in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3258
Warning: array_keys() [
function.array-keys]: The first argument should be an array in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3289
Warning: Invalid argument supplied for foreach() in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3289
Warning: array_keys() [
function.array-keys]: The first argument should be an array in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3332
Warning: Invalid argument supplied for foreach() in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3332
Warning: array_keys() [
function.array-keys]: The first argument should be an array in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3477
Warning: Invalid argument supplied for foreach() in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3477
Warning: array_keys() [
function.array-keys]: The first argument should be an array in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
1904
Warning: Invalid argument supplied for foreach() in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
1904
Warning: Invalid argument supplied for foreach() in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
2257
Warning: Invalid argument supplied for foreach() in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3206
Warning: implode() [
function.implode]: Argument must be an array in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3258
Warning: array_keys() [
function.array-keys]: The first argument should be an array in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3289
Warning: Invalid argument supplied for foreach() in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3289
Warning: array_keys() [
function.array-keys]: The first argument should be an array in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3332
Warning: Invalid argument supplied for foreach() in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3332
Warning: array_keys() [
function.array-keys]: The first argument should be an array in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3477
Warning: Invalid argument supplied for foreach() in
/home/wkiiorg/public_html/akii.org/wp-content/plugins/wp-syntax/geshi/geshi.php on line
3477
sendmail是类unix系统自带的邮件发送程序
而windows则没有sendmail。现在大部分人介绍的windows下的apache+php+mysql环境配置,仍然是没有说明如何与置php和sendmail.
我在server 2003上装了一下xampp。它自带了一个邮件发送程序mercury.界面是纯英文的,费好大力气终于配置能发送邮件了吧,结果发现只有163的邮箱能收到。其它邮箱都收不到。狂汗一顿。
于是总结了两种方法来配置php的sendmail.
一.
用sendmail结合其它的smtp服务器,如smtp.163.com来实现发邮件。现在大部分邮箱都要求smtp验证,所以要在sendmail.ini中加入用户名和密码。
php.ini配置(以用163邮箱为例)
[mail function]
; For Win32 only.
;SMTP = smtp.163.com
;smtp_port = 25
; For Win32 only.
;sendmail_from = me@example.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = "D:\www\sendmail\sendmail.exe -t"
就配置三项,smtp,smtp_port和sendmail_path
sendmail.ini配置
[sendmail]
; you must change mail.mydomain.com to your smtp server
smtp_server=smtp.163.com
smtp_port=25
auth_username=yourusername
auth_password=yourpassword
force_sender=yourusername@163.com
sendmail网上有下的,如果你是用xampp,那里面直接就带了。
不过此种方法,查看收到的邮件头,会是两个发件人。如果你有更好的配置方法,请告诉我。谢谢。
同时在虚拟主机的conf里加上这样一句
<directory d:/www/users/username>
php_admin_value sendmail_path 'd:\www\sendmail\sendmail.exe -t skyaga@skyaga.com'
</directory>
此邮件地址为用户的邮件地址,随便添。
二.采用windows的smtp服务。php.ini配置方法和上一种类似。或者,下载一个foxmail都可以
安装设置服务端
配置您的服务器向导 下一步找到pop3和smtp 然后进一步配置pop3和smtp服务器。
一切设置好后,你就拥护了自己的邮件发送服务器了!
SMTP装好以后 你应该是在WINDOW2K下,你找到PHP。INI文件
打开找到下面这些行
[mail function]
; For Win32 only.
SMTP = 10.0.0.9 ——-》替换成你的IP,10.0.0.9是偶的IP了 :)
; For Win32 only.
sendmail_from = test@test.com —》发件人信息
然后重新启动APACHE
为了安全和方便,建议采用第一种方法。配置 起来也方便。用一些大的邮件提供商的系统,总比自己的好吧:)
PHP&MYSQL apache php, foxmail, mercury, sendmail, server smtp, smtp server, unix, xampp
Recent Comments