-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Mailgun send multiple emails instead of 1 #3651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm not sure if it's related to the cause of the issue or not, but there's an issue in your Cloud Code function where you do not return a success or error, which means the client doesn't get any response to the web request. In that case, some clients may retry until it timeouts, which could result in multiple emails sent. You should always return a |
Hello wabirached! Thank you very much for your suggestion but I'm not sure if this is the cause of my problem because 2 reasons:
|
Hello wabirached! After a long time without being able to work on this I was finally able to check that you were completely right! So Thank you very much!! Anyway I'm having now a similar problem sending push notifications from CloudCode because some times they are resent. This time I've added response.success and response.error so I can't imagine the cause. |
Probably, because the client never received the response of |
Hello!
I have a problem I've asked in Stackoverflow and ServerFault several weeks ago with no answer, so this is my last chance to find the solution. I'll try to follow the steps to describe this "bug".
Issue Description
I migrated from Parse to Parse Server hosted in Digital Ocean (details below) and everything seemed to be working ok until I realized there was a problem sending emails (from the app through Cloud code and from Parse Server for email verification after the registration): the emails are sent multiple times, usually twice but sometimes 3, 4 even 5 or 6 times.
Steps to reproduce
I'm not sure what are the steps, but this is my code and configuration:
Parse Server configuration > myparseuser/cloud/main.js
Parse Server configuration > myparseuser/index.js
Mailgun configuration:
Expected Results
I expected that each verification email was sent only once, and each contact email (via CloudCode) was sent only once.
Actual Outcome
Each email is sent usually twice but sometimes 3, 4, 5 or 6 times.
Environment Setup
Server
Database
Logs/Trace
If I send and email from the app calling "functiontosendemail" in rare occasions the email is sent and received only once. Usually the email is sent and received between 3 and 8 times In these cases, after more or less 1 minute my app receives from Parse Server this error:
com.parse.ParseRequest$ParseRequestException: i/o failure
Mailgun Log shows this two actions between 3 and 8 times:
The text was updated successfully, but these errors were encountered: