Jump to content

PHP mail using PHP mailer.


Recommended Posts

Thanks, dude i was treating it like normal php mail() where you just add a , and thats it.

 

Problem no.2

 

this is the bit where it gets told the recipient

$mail->AddAddress($to[0]);
$mail->AddAddress($to[1]);
//$mail->AddAddress($to[2]);
//$mail->AddAddress($to[3]);
//$mail->AddAddress($to[4]);

 

now, this won't send if there is nothing in array($to) 2,3 etc. so how i can i get it to only have the address when there is that amount, without writing an if statement for each one.

 

e.g.

i know i could od

 

if(count($to) == 2)

{

$mail etc.

}

but is there a quicker way?

Although I've not been involved in this thread I would suggest rather than asking if the code is right and then bumping it when no one replies, try out the code yourself and if it isn't right, report back with any errors. You're more likely to get an informative response that way

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.