Hi, I am using the following mail function which is working fine but when i use this to send to an @ntlworld account they do not get it. Is there anything i can change that i am missing? function email_member($to_email, $esubject, $to_name, $from_company, $from_email, $content){ # -=-=-=- MIME BOUNDARY $mime_boundary = "----$from_company----".md5(time()); # -=-=-=- MAIL HEADERS $to = $to_email; $subject = $esubject; $headers = "From: $from_company <$from_email>\n"; $headers .= "Reply-To: $from_company <$from_email>\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\n"; # -=-=-=- TEXT EMAIL PART $message = "--$mime_boundary\n"; $message .= "Content-Type: text/plain; charset=UTF-8\n"; $message .= "Content-Transfer-Encoding: 8bit\n\n"; # -=-=-=- HTML EMAIL PART $message .= "--$mime_boundary\n"; $message .= "Content-Type: text/html; charset=UTF-8\n"; $message .= "Content-Transfer-Encoding: 8bit\n\n"; $message .= "<html>\n"; $message .= "<body style=\"font-family:Tahoma, Geneva, sans-serif; font-size:11px; color:#333; line-height:18px;\">\n"; $message .= "Dear $to_name,\n\n"; $message .= "<br>\n"; $message .= "$content"; $message .= "<br>\n"; $message .= "<br><span style='font-size:10px; color:#B9B8B8; line-height:12px;'><br><b>Email disclaimer</b><br>This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of $from_company. If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone. Please contact the sender if you believe you have received this email in error.</span>"; $message .= "</body>\n"; $message .= "</html>\n"; # -=-=-=- FINAL BOUNDARY $message .= "--$mime_boundary--\n\n"; # -=-=-=- SEND MAIL $mail_sent = @mail( $to, $subject, $message, $headers ); } PHP:
Have you checked the spam/junk folder? and are you sure your not validating the email anywhere? (if so post the code you use to validate, here).
adding this to the end of the code: if ($mailsend == FALSE) { echo 'Something went wrong: <a href="http://php.net/manual/en/function.mail.php">PHP Mail</a>'; } PHP: It'll tell you if the problem is at your end, of it's a problem with @ntlworld
@Marshton You have a typo in your code, you forgot to add the end quote, and semicolon. You can also do: function email_member($to_email, $esubject, $to_name, $from_company, $from_email, $content){ # -=-=-=- MIME BOUNDARY $mime_boundary = "----$from_company----".md5(time()); # -=-=-=- MAIL HEADERS $to = $to_email; $subject = $esubject; $headers = "From: $from_company <$from_email>\n"; $headers .= "Reply-To: $from_company <$from_email>\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\n"; # -=-=-=- TEXT EMAIL PART $message = "--$mime_boundary\n"; $message .= "Content-Type: text/plain; charset=UTF-8\n"; $message .= "Content-Transfer-Encoding: 8bit\n\n"; # -=-=-=- HTML EMAIL PART $message .= "--$mime_boundary\n"; $message .= "Content-Type: text/html; charset=UTF-8\n"; $message .= "Content-Transfer-Encoding: 8bit\n\n"; $message .= "<html>\n"; $message .= "<body style=\"font-family:Tahoma, Geneva, sans-serif; font-size:11px; color:#333; line-height:18px;\">\n"; $message .= "Dear $to_name,\n\n"; $message .= "<br>\n"; $message .= "$content"; $message .= "<br>\n"; $message .= "<br><span style='font-size:10px; color:#B9B8B8; line-height:12px;'><br><b>Email disclaimer</b><br>This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of $from_company. If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone. Please contact the sender if you believe you have received this email in error.</span>"; $message .= "</body>\n"; $message .= "</html>\n"; # -=-=-=- FINAL BOUNDARY $message .= "--$mime_boundary--\n\n"; # -=-=-=- SEND MAIL if(@mail( $to, $subject, $message, $headers )){ return true; } else { return false; } } PHP: It will echo 1 if it sent. Which will distinguish if its php mail related or a problem on the other-side (recipient)
It is definitely not on the server side as i have tried to several other email address including yahoo, gmail and hotmail and goes through fine. On this ntl email address though nothing comes through but does not go in the spam filter either.