Hi there people, I have a bit of an issue with sending web based email from my server. When it sends, it shows the return address as being The information that should be sent is <? echo $setting->support_email; ?> which is - it pulls that info from another area. Now when it sends the email, it is not showing the correct return address. Here is the part of the script that is sending the info: Code: // Pull emails $results = mysql_query("SELECT $row FROM $table") or die("Could not pull emails<br>".mysql_error()); $sent = mysql_num_rows($results); if($row = mysql_fetch_assoc($results)) { do { $email_body = $body; $subject = $sub; $email_body = str_replace("\\","",$_POST['msg']); $email_header = "From: $from\n"; $email_header .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal $email_header .= "Return-Path: <$return>\n"; $email_header .= "Content-type: text/html; charset=iso-8859-1\r\n"; mail($row["email"], $subject, $email_body, $email_header); } while ($row = mysql_fetch_assoc($results)); } else { echo "No Email Addresses to send."; } ?> Your message has been sent<br> Any thoughts? Could it be that the from part in the form that is being submitted looks like: New Zealand Photos, NZ Images & Stock Photography <steve@ccmarine.co.nz> Could the , be causing problems?
try changing this line $email_header = "From: $from\n"; Code (markup): you can even set it yourself if you want instead of doing it dynamically. $email_header = "From: New Zealand Photo Sales <steve@ccmarine.co.nz>\n"; Code (markup):