[PHP-users 20718]Re: PHP3でmailを送信する方法

Shindo shindo @ atsystem.jp
2004年 3月 11日 (木) 22:06:49 JST


進藤です。

一応、PHPのmail関数からsendmailへ渡っているようですね。
>   mail($mmadr, $kenmei, $messages, "From:root @ wcric.com");
                   〜〜〜〜〜〜〜〜〜〜〜
この辺りが悪さしているように思えますので
こんな感じで実行してみてはいかがでしょうか。
<?php
 $mmadr = "takai @ ohbec.co.jp";
 $kenmei = "test";
 $messages = "hello!\n";
 $messages .= "received\n";

     mail($mmadr, $kenmei, $messages);
?>



>実行前後の
>/var/log/maillogの中身です。
>
>Mar 11 19:56:01 ora sendmail[1073]: i2BAu1h6001073: from=nobody, size=
>167,
>class
>=0, nrcpts=0, msgid=<200403111056.i2BAu1h6001073 @ ora.wcric.com>,
>relay=nobody @ lo
>calhost
>Mar 11 20:01:00 ora sendmail[1111]: i2BB10Wx001111: from=root, size=
>21516,
>class
>=0, nrcpts=1, msgid=<200403111101.i2BB10Wx001111 @ ora.wcric.com>,
>relay=root @ loca
>lhost
>Mar 11 20:01:00 ora sendmail[1117]: i2BB107h001117:
>from=<root @ ora.wcric.com>, s
>ize=21792, class=0, nrcpts=1,
>msgid=<200403111101.i2BB10Wx001111 @ ora.wcric.com>,
> proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
>Mar 11 20:01:00 ora sendmail[1111]: i2BB10Wx001111: to=root, ctladdr=
>root
>(0/0),
> delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=51516, relay=[127.0.
>0.1]
>[12
>7.0.0.1], dsn=2.0.0, stat=Sent (i2BB107h001117 Message accepted for
>delivery)
>Mar 11 20:01:01 ora sendmail[1118]: i2BB107h001117: to=<root @ ora.wcric.
>com>,
>ctl
>addr=<root @ ora.wcric.com> (0/0), delay=00:00:01, xdelay=00:00:00,
>mailer=local,
>pri=52007, dsn=2.0.0, stat=Sent
>
>Apacheのerror_logには特にmailに関しての記述はありませんでした。
>

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
 進藤寿則@アットシステム   _/_/
 e-mail shindo @ atsystem.jp     _/





PHP-users メーリングリストの案内