Magalliu's avatar

The email is being send only when hard refreshing the browser (Control + F5)

The contact form work like a charm. There is no problem on sending the email, receiving all the info etc.

The problem is that sometimes when submitting the form the email would not always be sent. When first time fails and perform a hard refresh and submitting the form again will receive 2 email instantly. There is no problem about the code it self since there is no issue with sending email and receiving the info.

So time to time need to perform a hard refresh (control/ctr + F5) and time to time it works without any problem. This makes me think that may be a server problem.

P.S. We already restart the supervisor. I'm using Jobs for sending email and Lumen framework for this project.

Any idea about? Thanks!

0 likes
5 replies
CorvS's avatar

@marinario How does sending the email fail exactly? Is a row added to your failed_jobs table? Are you sure the email isn't sent? Maybe your worker is just slow and takes its time.

Magalliu's avatar

Nothing on failed_jobs table and the email is not sent because I have waited for hours. If I will perform a hard refresh and submit the contact form again the email will be sent twice.

CorvS's avatar

@marinario

I have waited for hours

Have you checked your jobs table, if a job has been queued? Are you sure the endpoint is being hit and the validation passes?

Magalliu's avatar

Yes I have checked sorry not to mention it. No jobs on queue when the problem occurs. It's like nothing was submitted. The info is sorta saved and when hard refresh and resubmit the form again it will be send the first and the second email.

The endpoint is being hit and the validation pass. No errors at all.

This only happens time to time. After hard refresh will work for hours than the problem occurs again. I think that must be some problem with the server but SysAdmin claims that everything is ok...

CorvS's avatar

@marinario Since you said that sending emails is no problem it has to be related to that specific request. How exactly are you sending the mail? Do you mind sharing your code?

Please or to participate in this conversation.