作者:shanshanhongxing | 来源:互联网 | 2014-05-28 08:57
安装yuminstallsendmail启动sendmail和postfixservicesendmailstartservicepostfixstart测试发送邮件touchmail.php[code]?phpmail(your_email_addr@gmail.com,subject,messagebody);?[
安装 yum install sendmail
启动sendmail 和postfix
service sendmail start
service postfix start
测试发送邮件
touch mail.php
[code]
mail('your_email_addr@gmail.com','subject','message body');
?>
[/code]
chmod a+x mail.php
php mail.php
然后检查邮箱中是否已经收到邮件
将邮箱服务设置为开机后即启动
chkconfig sendmail on