Sending emails is not reliable


#1

I’m using email messages to confirm user registration for my site. This works very intermintently.

I have created several accounts with no issue, getting the email to my inbox within a few minutes.

Occassionally, like now, I do not get the email. I do not see any errors reported in the code and I do not see the email usage count increasing.

I have not reached my email quota.
Is there some restriction or delays added to free accounts.

The snippet below shows the php code that has worked to send the email:

$headers ="From:help@kidsbooks.gq\nCC:garryjokeeffe@gmail.com" ;

// Email Variables
$toUser  = 'help@kidsbooks.gq'; // recipient
$subject = "new user account created"; // subject

$body  = "User email :" . $email . "id:" . $userID  . " has just been added\r\n";
if( mail($toUser,$subject,$body,$headers) ){

I need this to work smoothy and consitently or I will loose users. Once my site is running I will have to move to the paid service but unless I can get the email working reliably I will not be able to do this.

Thanks for any help.


#2

Hi !

If the issue happens occasionally, it’s very hard to debug it. It could be either because of our mailing servers timeouts, either because of Freenom MX servers either because of your E-mail provider.

Modify $headers line to this:

$headers = "From:help@kidsbooks.gq \r\n CC:garryjokeeffe@gmail.com" ;

If the issue persists, please use your actual mailbox address as $toUser. Reply the results.


#3

I have tried your suggestions but I still cannot get my emails to send.

I have also tried sending the emails to different accounts and tried changing the email forwarding. But nothing helps.

I also noticed the statistics page shows that I have not sent any emails since this morning ie. 5 hours ago but I have tried sending multiple in that time, it is stuck on 5. Which suggests that the emails are not leaving the server.

Thanks for helping with this.


#4

What is the website on which you are experiencing the issue?


#5

The address is kids-books.000webhostapp.com but I also have a freenom name of kidsbooks.gq.


#6

I have just tried them again and it appears to be working again. I have changed nothing since yesterday.


#7

I have just checked your site and mailing are sending/receiving in a normal behaviour. It was probably a temporary issue :slight_smile:


#8

Thanks I’ll test it again later, it did seem to work last night.

I’m currently trying to set up cloudflare again as I have lost the https from my URL i.e. it uses the HTTPS.

I have not worked on this site for about a year and you helped me to get the secure site last time.


#9

It seems to be working fine now.

Thanks

Garry


#10

We’re happy the issue has been solved! :blush:

For any further problems, please do contact us on this forum.


#11

This topic was automatically closed after 2 days. New replies are no longer allowed.