This mail function not working

foreach ($viewer_name as $res)
$subject=“You Have a Meeting Request By Samson”;

    $message ="Login to CRM And View Meeting Request";

    $to = implode(',', $res['admin_email']);

    $header = "";
    //$body="Plain text";
    mail($to, $subject, $message, $header);


Do yourself a favour and use a mailing library (SwiftMailer, PHPMailer) because using plain mail() is a PITA.


what is the reason for this function not working can you explain me clearly

i got this error in my webpage:

Warning: implode(): Invalid arguments passed in meeting_request_action.php on line 63

Any body tell me soon.

well, $res['admin_email'] is not an array.

ya,It’s correct i remove implode() it’s working fine.

thanks Dormilich

You shouldn’t be setting $subject, $message and $header within a loop when they are the same for all recipients.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.