2017-12-17 33 views
-1

文字列に複数のメールに一つのメッセージを送ってください$電子メールの例:私のsoluctionであなたの影響のためどのように私はのような文字列を持っている

$to = '[email protected]'; 
    $msg = 'SEND these to each email above thanks'; 
    $to = '[email protected]'; 
    $msg = 'SEND these to each email above thanks'; 
    $to = '[email protected]'; 
    $msg = 'SEND these to each email above thanks'; 



    foreach($email as $email) 
    { 
    $to = $email["to"]; 


    $subject = 'the subject'; 
    $message = '$msg'; 
    $headers = 'is this really? '; 
    mail($to, $subject, $message, $headers); 

    } 

大きな感謝を

+0

開始 '$ email'は配列ではありません。' explode() 'を使って1にしてください。 – nogad

+0

@nogad 私は本当にあなたのアイデアを得ることはありません任意のコード例がありますか? – user9107323

答えて

0

電子メールの文字列を分割してみて、各電子メールのメール

を送信するコードを実行
<?php 

$emails = '[email protected],[email protected]'; 
$emailsSplitted = explode(',', $emails); 

foreach ($emailsSplitted as $email) { 
    // ... 
    // use here the variable $email to send the message 
} 
関連する問題