Good afternoon,
We have a problem with sending emails through an email template, we receive the below error:
What can cause this error?
Good afternoon,
We have a problem with sending emails through an email template, we receive the below error:
What can cause this error?
Hi, @Michel_Loriaux
You need to change the method from GET to POST. Hereâs a link to documentation that can help you create a request
Send Emails with Templates API - Backendless REST API Documentation
Regards,
Marina
@Michel_Loriaux, unfortunately I was unable to reproduce the issue in my apps. Could you please provide the full cURL that you sending? Also if you can create a page with minimal logic on which we can make checks themselves it will help us to establish your problem
Regards,
Marina
Hi Marina,
App id = 45D74295-8B81-D693-FF49-5EC08E970C00
When you go to preview and login with username Dnn04bhr and password 1111 then you can login.
In the top of the page you find:
then you arrive in the test page:
pagename is dnntestemail
curl âhttps://rapidwork.backendless.app/api/emailtemplate/sendâ
-H âAccept: /â
-H âAccept-Language: en-US,en;q=0.9,nl;q=0.8â
-H âConnection: keep-aliveâ
-H âContent-Type: application/jsonâ
-H âCookie: user-auth-cookie-45D74295-8B81-D693-FF49-5EC08E970C00=74DE5960-B2D3-4E05-AD85-FB92E0F398BBâ
-H âOrigin: https://rapidwork.backendless.appâ
-H âReferer: https://rapidwork.backendless.app/api/files/ui-builder/containers/INLOG_II/index.html?page=dnntestemail&data={}â
-H âSec-Fetch-Dest: emptyâ
-H âSec-Fetch-Mode: corsâ
-H âSec-Fetch-Site: same-originâ
-H âUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36â
-H âsec-ch-ua: âGoogle Chromeâ;v=â107â, âChromiumâ;v=â107â, âNot=A?Brandâ;v=â24ââ
-H âsec-ch-ua-mobile: ?0â
-H âsec-ch-ua-platform: âWindowsââ
-H âuser-token: 74DE5960-B2D3-4E05-AD85-FB92E0F398BBâ
âdata-raw â{âaddressesâ:[âemail@gmail.comâ],âcc-addressesâ:[âemail@gmail.comâ],âuniqueEmailsâ:true,âtemplate-nameâ:âmaandoverzichtakkoordâ,âtemplate-valuesâ:{âmaandâ:0,ânaambeheerderâ:0,âemailakkoordâ:0,âusernameâ:0}}â
âcompressed
Hi, @Michel_Loriaux
Do you still have the issue? I could not reproduce it in your app as well.
The request was sent through the steps you indicated above:
curl 'https://rapidwork.backendless.app/api/emailtemplate/send' \
--data-raw '{"addresses":["jmlorxxxxx@gmail.com"],"cc-addresses":["jmlorxxxxxx@gmail.com"],"uniqueEmails":true,"template-name":"maandoverzichtakkoord","template-values":{"maand":0,"naambeheerder":0,"emailakkoord":0,"username":0}}' \
--compressed
Response I got was succeess:
{"messageId":"mail:a1f2f2cc-1691-4800-adf9-b21593629661","errorMessage":null,"status":"SCHEDULED","sendingTimeInMillis":null,"successfulSendsAmount":null,"failedSendsAmount":null}
Regards,
Marina
Hi Marina,
Yes the issue is still there, can you try now again?
I get that same response when a mail is not send, for example with the emailaddress i have set now.
Hi @Michel_Loriaux ,
This is really strange behavior since I just tried to send test email from preview page of your app (as you described above) and there were no problem with it. Tried different browsers but still everything worked smoothly.
What browser do you use? I am interested in browser name and version.
Regards, Andriy
Hi @Andriy_Konoz,
Thanks for checking. The problem is that we donât receive a email on this emailaddress. We are using the Google Chrome browser
The problem is that we donât receive a email on this email address
Then it is different problem since topic was created for 404 error on making âsend emailâ request from the browser. There could be several reasons why you do not receive an email from your app:
https://rapidwork.backendless.app/api/messaging/{messageId}
. Message ID can be found in a response of .../send
route in messageId
field.Checked sending one more time and also checked status of sent message - there were no problems in my case.
Could you please check your SMTP settings?
Regards, Andriy
Hi @Andriy_Konoz,
When i do the SMTP test then it shows me the test is passed:
When i check the messageid, i get this:
Maybe you receive it to the Spam folder? Have you tried to send a letter to the different email?
Regards, Andriy
Hello @Andriy_Konoz,
No we did not receive it in the Spam folder. We found out yesterday that there were several email addresses not receiving the email. The one gmail email address we tried has the same error message, but does get send.
About checking message status. Message ID in your case looks strange. It should be something like that mail:e5dc6557-df89-4d67-92cc-6544e6925759
About the problem itself. Our QA also tried to send email to their email from test page which you have provided and there again was no problem email was sent and received.
We found out yesterday that there were several email addresses not receiving the email
It seems to be problem with specific mail servers where those emails are created.
There are no errors in logs on our side. Also during the checks by our QA test emails were sent and received without any problems.
Regards, Andriy
Hi @Andriy_Konoz,
We tried three different SMTPâs but the problem remained, we found out that because of an URL in the custom mail template somehow the mails where not send to the recipients. So now we removed the URL from the mail but in another Backendless app we do the same thing, the only difference is that we refer to a custom domain instead of a backendless.app domain.
Hello @Michel_Loriaux,
Unfortunately I wasnât able to reproduce this issue.
I tried to
Both cases worked without issues.
the mails where not send to the recipients
Could you please clarify, if any of the recipients received the email? or nobody received it at all?
Hi Olha,
The custom template which gave errors was:
The emails were correctly send to gmail email addresses, the company email addresses did not receive the emails.
Hello @Michel_Loriaux,
I have tried to send this email template to my company email (not gmail) and I received it. It means that Backendless sends emails correctly, the problem might be somewhere in the SMTP server.