Jump to content


Help sending 2 emails at once

  • Please log in to reply
1 reply to this topic

#1 jimmyp3016

  • Members
  • PipPipPip
  • Advanced Member
  • 55 posts

Posted 18 July 2006 - 05:41 PM

Can someone tell me why this doesnt send 2 emails? It will send either message if i email one person, but if i try to send to both people with the different messages i get a 500 internal server error. Any help would be great Thanks! Im bascially getting info from someone. Sending the info to my email and then sending a email to the person that subbmited.



$user   =   $_GET['usr']; 
$email = $_GET['email']; 

include 'asolead.php'; 
include 'mail_body.php'; 

$submit_f_name      =   $_GET['name']; 
$submit_email      =   $_GET['name2']; 
$submit_phone      =   $_GET['mail']; 

if ( ($submit_f_name=="") || ($submit_email=="") || ($submit_phone=="") ) 

$from_address = 'info@mywebsite.com'; 

$to_address   =   "$email"; 

$subject   =   "$submit_f_name , Thank you for viewing my Website"; 

header("Location: http://www.mywebsite.com/otherfile.php"); 

mail ("$to_address", "$subject", "$asolead", "From: info@mysite.com \nContent-Type: text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: 8bit"); 
mail ("$submit_email", "$subject", "$mail_body", "From: $to_address \nContent-Type: text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: 8bit"); 


#2 micah1701

  • Members
  • PipPipPip
  • Advanced Member
  • 613 posts
  • LocationEllington, CT USA

Posted 18 July 2006 - 06:43 PM

not sure that this is behind your problem, but for starters

header("Location: http://www.mywebsite.../otherfile.php");

your calling this header before you call the mail() functions.

the script is going to forward to that location BEFORE it sends the e-mails.
"Confidence in the face of risk."

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users