[請益] 有關php寄信的header問題
最近在測試php的寄信功能,我是用gmail來收信,可是收到信之後的寄件者
變成了'system user for apache',且電子信箱也變成了該SMTP,
不知道header的寫法是不是有問題
這樣的寫法會跑出上述的結果,且完全看不到To:、From:的資訊
$headers='To:$encodeTo_name<$to_mail>\r\n'
'From:$encodeFrom_name<$from_mail>\r\n' .
'MIME-Version:1.0\r\n' .
'Content-Transfer-Encoding: 8bit\r\n' .
'Content-type:text/plain; charset=UTF-8\r\n';
把'換成"的寫法會變成unknown sender
$headers="To:$encodeTo_name<$to_mail>\r\n" .
"From:$encodeFrom_name<$from_mail>\r\n" .
"MIME-Version:1.0\r\n" .
"Content-Transfer-Encoding: 8bit\r\n" .
"Content-type:text/plain; charset=UTF-8\r\n";
--
. . . . .
. . / . . .
. . / .
. . / . . .
Widerstand ist zwecklos!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.119.29.12
推
04/29 18:14, , 1F
04/29 18:14, 1F
→
04/29 18:15, , 2F
04/29 18:15, 2F
PHP 近期熱門文章
PTT數位生活區 即時熱門文章