Chinaunix首页 | 论坛 | 博客
  • 博客访问: 172388
  • 博文数量: 51
  • 博客积分: 2302
  • 博客等级: 大尉
  • 技术积分: 420
  • 用 户 组: 普通用户
  • 注册时间: 2009-01-12 17:47
文章分类

全部博文(51)

文章存档

2010年(6)

2009年(45)

分类:

2009-02-02 17:58:46

php mail 发送:
1、修改php配置文件php.ini
[mail function]
; For Win32 only.
SMTP = localhost
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 = /usr/sbin/sendmail -t -i //打开开关,添加-t -i参数[修改这里]
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
2、检查sendmail服务是否启动
3、启动sendmail :
sudo /etc/rc.d/init.d/sendmail start
或者 sudo /usr/sbin/sendmail -bd

4、检查 邮件队列情况 /usr/sbin/sendmail -bp
也可以查看目录 /var/spool/mqueue 注意他的属主是root 组: mail
5、好了,开始发送邮件吧~
阅读(746) | 评论(1) | 转发(0) |
0

上一篇:几个优化 Apache 的技巧

下一篇:linux 分区

给主人留下些什么吧!~~

reasonpun2009-11-20 11:24:42

有时候我会遇到这样的情况: [root@BJ-FT-1F-120-3 ~]# mail -s "192.168.120.3:31%used in /usr" reasonpun@139.com< q > EOF [root@BJ-FT-1F-120-3 ~]# /usr/sbin/sendmail -bp /var/spool/mqueue (1 request) -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient----------- nAK39QOx002045 2 Fri Nov 20 11:09 (Deferred: 450 Requested mail action not taken: too much reci) Total requests: 1 那我修改了下这个文件 vi /etc/