anthelo Posted March 24, 2011 Share Posted March 24, 2011 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 = "[email protected]"; //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? Quote Link to comment https://forums.phpfreaks.com/topic/231575-php-mail-dont-work-with-my-new-server/ Share on other sites More sharing options...
MrXHellboy Posted March 24, 2011 Share Posted March 24, 2011 Are you using this @ localhost or hosting company ? Quote Link to comment https://forums.phpfreaks.com/topic/231575-php-mail-dont-work-with-my-new-server/#findComment-1191636 Share on other sites More sharing options...
anthelo Posted March 24, 2011 Author Share Posted March 24, 2011 hey, MrXHellboy hosting company Quote Link to comment https://forums.phpfreaks.com/topic/231575-php-mail-dont-work-with-my-new-server/#findComment-1191638 Share on other sites More sharing options...
trq Posted March 24, 2011 Share Posted March 24, 2011 The mail function does not rely upon IMAP or POP3. Can you describe what you mean by "is not working like it used to be.." ? Is mail() returning true but your not receiving emails? Quote Link to comment https://forums.phpfreaks.com/topic/231575-php-mail-dont-work-with-my-new-server/#findComment-1191639 Share on other sites More sharing options...
MrXHellboy Posted March 24, 2011 Share Posted March 24, 2011 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); Quote Link to comment https://forums.phpfreaks.com/topic/231575-php-mail-dont-work-with-my-new-server/#findComment-1191641 Share on other sites More sharing options...
anthelo Posted March 24, 2011 Author Share Posted March 24, 2011 @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 Quote Link to comment https://forums.phpfreaks.com/topic/231575-php-mail-dont-work-with-my-new-server/#findComment-1191643 Share on other sites More sharing options...
MrXHellboy Posted March 24, 2011 Share Posted March 24, 2011 As thorpe already stated, mail() is not relying on IMAP or POP. Those protocols are related to retrieving email through MUA/email clients. Quote Link to comment https://forums.phpfreaks.com/topic/231575-php-mail-dont-work-with-my-new-server/#findComment-1191646 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.