Jump to content

Mailing Multiple users


MemphiS

Recommended Posts

The idea i had at doing this was:

Example:

<?php

$mailpost = $_POST['mail'];

$allmail = explode(",",$mailpost);

 

for ($i=0; $i<count($allmail); $i++){

mail(); // subject etc.. would be entered but not for this example.

}

?>

 

Can someone tell me or give me an example of where im going wrong... Thanks ;)

Link to comment
https://forums.phpfreaks.com/topic/55261-mailing-multiple-users/
Share on other sites

If I was in your place i did it in this way

<?php
$mail = new mail($_POST['mail'], "Subject", "Mail Body");
//3 Arguments Are Given
//$mail = new mail("to@domain", "Mail Subject", "Mail Body");
if($mail->send())
    {
        echo "Mail Sent Succfully\n";
    }
else 
    {
        echo "Sorry Mail Sending Failed\n";
        print_r($mail->error);//Print The Errors
    }
?>

Class aviliable at

http://zigmoyd.sourceforge.net/man/mail.php#mail

Installation and Instruction on

http://zigmoyd.sourceforge.net/man/index.php

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.