Form with multiple email fields to multiple recipients?

Looks like you need to $_POST the email1, email2 etc. Values to a variable then use that as your value for $to in the mail() function - just make sure you add a comma after each: $to = $_POST'email1' . ', '; $to . = $_POST'email2' .

', '; $to . = $_POST'email3' etc.Leave off the comma for the last email and you should be ready to go Regarding the content of your email, you should be able to send html no problem - just store it in a variable for ease of use later, e. G: $message = ' This is the HTML Email Welcome to the html!

' ."\r\n Then call mail() with your defined variables: mail($to, $subject, $message, $headers) Hope that helps p.s. Its all available on the mail function definition: mail().

Looks like you need to $_POST the email1, email2 etc. Values to a variable then use that as your value for $to in the mail() function - just make sure you add a comma after each: $to = $_POST'email1' . ', '; $to . = $_POST'email2' .

', '; $to . = $_POST'email3'; etc.Leave off the comma for the last email and you should be ready to go. Regarding the content of your email, you should be able to send html no problem - just store it in a variable for ease of use later, e.

G: $message = ' This is the HTML Email Welcome to the html!'; then make sure you add the relevant HTML headers: $headers = 'MIME-Version: 1.0' . "\r\n"; $headers . = 'Content-type: text/html; charset=iso-8859-1' ."\r\n"; Along with any other headers e.g. : $headers .

= 'From: HTML Email ' ."\r\n"; Then call mail() with your defined variables: mail($to, $subject, $message, $headers); Hope that helps. P.s. Its all available on the mail function definition: mail().

Great answer! Except that I wouldn't want the recipients to see the email 'To:' field as To: you@example. Com, [email protected], hi@example.

Com I just want them to see their own email at the 'To:' field – doodoodukes Sep 28 at 8:45 A quick google search turned up this post, pear-forum. Org/topic2410. Html, which is interesting.

I'd recommend the last option, which is to supply the To: header as your own name/email address (address of the sender) - I see this done a lot in newsletters I receive. $headers . = 'To: Your Name ' .

"\r\n"; – lowe_22 Sep 28 at 9:24.

Look at the php manual for mail Example: $toemails = "user@example. Com, anotheruser@example.com.

The $toemails are not specified by the developer, the users will determine who the emails should be sent to as per the form. – doodoodukes Sep 28 at 3:48.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions