KDM Posted August 4, 2011 Share Posted August 4, 2011 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); Link to comment https://forums.phpfreaks.com/topic/243849-trying-to-make-my-form-send-info-to-two-different-email-addresses/ Share on other sites More sharing options...
ManiacDan Posted August 4, 2011 Share Posted August 4, 2011 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 Link to comment https://forums.phpfreaks.com/topic/243849-trying-to-make-my-form-send-info-to-two-different-email-addresses/#findComment-1252066 Share on other sites More sharing options...
KDM Posted August 4, 2011 Author Share Posted August 4, 2011 I see, thanks that worked. Link to comment https://forums.phpfreaks.com/topic/243849-trying-to-make-my-form-send-info-to-two-different-email-addresses/#findComment-1252077 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.