PHP Sendmail() method delivers mail after 5 minutes - How to Fix?

Problem:

Use sendmail() method to send mail to the registered user. Email sends when user registered but it takes 5 minutes to send the mail every time.

Solution:

Try using normal php mail() function to check if its server issue

<?php
$to      = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
?>

if mail get sent fast then server is working fine.

Comments

Popular posts from this blog

About 12 Alwars

Post thumbnails from external URLs don’t appear in Blogger. How to resolve?

What is the unicode character for the close symbol?

ஸ்தல விசேஷம் - திருக்கோவிலூர் திவ்யதேசம்