Jump to content

Trying to make my form send info to two different email addresses.


KDM

Recommended Posts

Will this work? Godaddy form mail takes forever so I'm still waiting.

 

$to = array('********@yahoo.com', '********@************.com');

 

$mailSent = mail('$to', '$subject', '$message', '$headers');

 

 

This is what I had when it was sending to one email address.

 

$to = '********@yahoo.com';

 

$mailSent = mail( $to, $subject, $message, $headers);

None of that will work.  You can't single-quote PHP variables.

 

 

$to = array('********@yahoo.com', '********@************.com');

foreach ( $to as $address ) 
{
  $mailSent = mail($address, $subject, $message, $headers);
}

-Dan

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.