環境 qmailインストール済 CentOS6
1 2 3 4 |
# yum install httpd php php-devel php-mbstring php-pdo php-gd php-xml php-mcrypt # service httpd start # chkconfig httpd on # service iptables stop |
1 2 3 4 5 6 7 8 9 |
# vi /etc/php.ini sendmail_path = /usr/sbin/sendmail -t -i ↓変更 ;sendmail_path = /usr/sbin/sendmail -t -i sendmail_path = /var/qmail/bin/qmail-inject |
1 |
# service httpd restart |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# vi /var/www/html/mail.php <?php mb_language("Japanese"); mb_internal_encoding("UTF-8"); $to = 'yuu@hoge.net'; $subject = '送っちゃうよ'; $message = '本文'; $headers = 'From: yuu@example.net' . "\r\n"; mb_send_mail($to, $subject, $message, $headers); |
ht …