亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

向不同的收件人發送不同的電子郵件php郵件

向不同的收件人發送不同的電子郵件php郵件

PHP
慕萊塢森 2022-07-02 15:55:01
for($f=0; $f<count($person); $f++){        $messageUser = "<div style='display: block; width: 520px; background-color: #edeeef; padding: 10px;'>                        <p>Please confirm the payment voucher for<br>                        <br>Request by: ".$usercreated."                        <br>Voucher Name: ".$pv_name."                        <br><br>Your pin no: <strong>".$pin[$f]."</strong>                            <button>Confirm Account</button>                        </a>                        </div>                        ";        $headers .= "Reply-To: Nothing <[email protected]>\r\n";         $headers .= "Return-Path: Nothing <[email protected]>\r\n";         $headers .= "From: Nothing <[email protected]>\r\n";          $headers .= "Bcc: Nothing <[email protected]>\r\n";         $headers .= "Organization: Nothing\r\n";        $headers .= "MIME-Version: 1.0\r\n";        //    $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";        $headers .= "Content-type: text/html\r\n";        $headers .= "X-Priority: 3\r\n";        $headers .= "X-Mailer: PHP". phpversion() ."\r\n" ;        $from = "[email protected]";        $retvaladmin2 = mail($person[$f],$subject,$messageUser,$headers, "-f" . $from);            if($retvaladmin2){                $statusemail = 'success';            }echo $person[$f];echo "<br>";echo $statusemail;echo "<br>";}我想為不同的收件人發送 $pin[$f] 的驗證碼,每個收件人都有唯一的密碼。我讓它循環發送電子郵件。第一個收件人收到了電子郵件,但第二個收件人沒有。它顯示錯誤554 Transaction failed: Duplicate header 'From'
查看完整描述

1 回答

?
絕地無雙

TA貢獻1946條經驗 獲得超4個贊

$headers您需要在循環迭代之間清除。



查看完整回答
反對 回復 2022-07-02
  • 1 回答
  • 0 關注
  • 124 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號