Jump to content

php mail() ... dont work with my new server


anthelo

Recommended Posts

Hello,

 

im using a contact form which sends me an email with the data name.. comments ..

 

Now im testing a new better server which use IMAP (old POP3) and my form is not working like it used to be..

 

                $emailTo = " $dbSentEmail"; //Put your own email address here
	$emailServer = "noreply@totalsports.com.cy"; //Put your own email address here
	$body = "Name: $name \n\nEmail: $email \n\nSubject: $subject \n\nComments:\n $comments";
	$headers  = 'MIME-Version: 1.0' . "\r\n";
	$headers .= 'Content-type: text/plain; charset=UTF-8' . "\r\n";
	$headers .= 'From: Contact Form <'.$emailServer.'>' . "\r\n" . 'Reply-To: ' . $email;

	mail($emailTo, $subject, $body, $headers);

 

Any idea what i have to do to work like before?

 

Link to comment
Share on other sites

IMAP is just for retrieving the email, just like POP3. If its a send issue, you can blame the MTA (otherwise known as SMTP).

In that case, you have to raise a support ticket

 

Add on top of your script to see error, which are trigger by mail()

error_reporting(E_ALL);
ini_set('display_errors', 1);

Link to comment
Share on other sites

@thorpe

Let me explain..

 

Im running the same script on 2 differents hosting servers, on my new server for some reasons im using imap.domain.com on my old just the domain.com for incoming and outgoing..

 

The same script is running live on both servers  (old/new) ... my old server is working perfect on the new one is not sending the email like its supposed to be.

 

Thats why im looking if there is any differences using pop3/imap and mail() function

 

@MrXHellboy

 

Thanks ill try that

 

 

Thank you guys

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.