Jump to content

trouble with this email code


pioneerx01

Recommended Posts

Hi,

 

I have this email code working for me:

 

$headers1 = "From: [email protected]\r\n"; 
$headers1 .= "BCC: [email protected]\r\n";
$to1 = $_GET['e1'].", ". $_GET['e2'].", ". $_GET['e3'].", ". $_GET['e4'];
mail($to1, " my subject line", " my message here ", $headers1);

 

In the forms users can submit up to 4 independent email addresses (but are not required to do so) in any combination. This email from works only if email address 1 and 4 are entered. Other can be entered too, but if 1 and 4 are not there email does not go out. I sort of understand why, but I can not figure out a way around it and I do not want to split to 4 independent email codes. 

 

Any help on this one?

Thanks

Link to comment
https://forums.phpfreaks.com/topic/224119-trouble-with-this-email-code/
Share on other sites

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.