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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.