Page 1 of 1

Sending an email using mail()

Posted: Mon Jul 23, 2007 10:13 am
by aceconcepts
Hi,

I have used mail() plenty of times before and it has worked fine.

I am using it now and it works very well except for one domain (my own email address).

It is a 'contact us' form I have made and I have sent test messages to various email accounts and it works well except for my own domain.

I have got onto my email maintenance people and they have asked:

"Do you know how the emails are sent out, is it mapped to a SMTP account, or IMAP etc…"

Here is the code for sending the message:

Code: Select all

$to = "nick@q2q.co.uk";
		$subject = "Message from Q2Q web site";
		$message = $guestMsg;
		//CHECK GUEST CONTACT PREFERENCE
			if($guestByTel==1)
			{
				$message .= "<br /><br /><span style=\"font-weight:bold;\">" . $guestName . " has made a request to be contacted by telephone.</span>";
			}
		$from = $guestEmail;
		$headers = "MIME-Version: 1.0\r\n";
		$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
		$headers .= "Content-Transfer-Encoding: 7bit\r\n";
		$headers .= "From: " . $from . "\r\n";
		$headers .= "Reply-To: " . $from . "\r\n";
		mail($to,$subject,$message,$headers);
Any ideas/suggestions?

Posted: Mon Jul 23, 2007 12:34 pm
by miro_igov
Maybe you need to read the bounce-back message. It should be located on your server.

Re: Sending an email using mail()

Posted: Mon Jul 23, 2007 2:17 pm
by superdezign
aceconcepts wrote:Any ideas/suggestions?
My suggestion = Swiftmailer.

Posted: Mon Jul 23, 2007 2:49 pm
by Benjamin
Try setting the Return Path header.