0

PHP メール機能を使用して、Web アプリからメッセージを送信しています。送信する電子メール アドレスとメッセージを保持するテーブルを作成しました。スクリプトは一定数のメッセージを取得して送信します。

$headers  = 'MIME-Version: 1.0' . "\r\n";
            $headers .= 'Content-type: text/html; charset=' . $charset . "\r\n";
            $headers .= 'To: ' . $destName . ' <' . $destAddress . '>' . "\r\n";
            $headers .= 'From:' . $fromName . ' <' . $fromAddress . '>' . "\r\n";
            $headers .= "Reply-To: ". $fromName . ' <' . $fromAddress . '>' . "\r\n";
            
            mail($destAddress, $subject, $msgBody, $headers);

私の問題は、FROM および REPLY-TO ヘッダーを設定しても、受信メッセージのリストに表示されるアドレスがおかしくなっていることです (私が送信したものではありません)。下の写真を参照してください。

ここに画像の説明を入力

しかし、メッセージを開くと、すべて問題ないように見えます。つまり、送信者は私が設定したものです。

誰でも私を助けることができますか?

4

2 に答える 2

1

If there would be nothing that shows that the "from" and "reply-to" field are different from the address from where the mail was sent, then everyone would be able to sent you a mail coming from for instance obama@whitehouse.org If you want the email of your choice to be shown, you should use smtp, log in to the mailserver with the correct account, and sent the mail. This will cause the mail to be verified and trusted. http://www.9lessons.info/2009/10/send-mail-using-smtp-and-php.html

于 2013-05-02T11:00:35.697 に答える