2
我需要發送電子郵件給用戶,每個人。這是數組PHP郵件數組到字符串
array(5) {
[0]=> array(2) { ["email"]=> string(20) "[email protected]" ["name"]=> string(8) "حمزة" }
[1]=> array(2) { ["email"]=> string(13) "[email protected]" ["name"]=> string(4) "tooo" }
[2]=> array(2) { ["email"]=> string(14) "[email protected]" ["name"]=> string(8) "احمد" }
[3]=> array(2) { ["email"]=> string(21) "[email protected]" ["name"]=> string(14) "اشهارات" }
[4]=> array(2) { ["email"]=> string(20) "[email protected]" ["name"]=> string(9)
,我有這樣的代碼來發送電子郵件
$hs = "From: \"Ishharat\"<[email protected]>\n";
$hs .= "Reply-To: [email protected]\n";
$hs .= "Content-Type: text/html; charset=\"utf-8\"";
if(mail($to,$subject,$body,$hs))
return TRUE;
else {
return FALSE;
}
創建電子郵件的方法,並用它在環上的陣列 – Ehsan