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
Could not work sending mail via mailgun. #504
Comments
Hi @dutzhk , I've pushed a fix for the leaked connection, thanks for opening the issue. About the mailgun api: I tried on the demo platform and it works correctly, so maybe there is some configuration issue on your side? (most likely the mailgun domain or some mismatch with the mailgun email sender ?) About the v2 api url, it should work (as they have kept the backward compatibility see https://www.mailgun.com/blog/default-api-version-now-v3 ). |
@dutzhk maybe I found the issue, could it be that it expect to use the EU region? So the base api should be |
Hey @syjer, thank you for answering. Will try again, I surely made a mistake somewhere along the road with the configuration of the api. I did not use regional sending, just standard US. Also thought they would keep the backward compatibilty but I just pointed out as I wasn't sure. Best regards! |
I've pushed the EU region choice and updated the api endpoint to the v3. They will be available in the 1.16 release. :) Even if it's not your issue, it's a nice thing to have. |
I agree, it's a nice to be able to use regional sending, especially if you have great volume. |
Hi @dutzhk, FYI, mailgun opened the regional (EU) service mainly for GDPR compliance. |
Describe the bug
Configured mailgun correctly, but could not send mail. This is the log output. I've included also an older line of log that warns of a leaked connection to the api mailgun. I think this is another issue, but thought it would be useful to paste it here also.
Sep 13, 2018 9:18:32 AM okhttp3.internal.platform.Platform log
WARNING: A connection to https://api.mailgun.net/ was leaked. Did you forget to close a response body? To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);
11:38:17.086 [QuartzScheduler_Worker-9] WARN alfio.manager.system.MailgunMailer - sending email was not successful:Response{protocol=http/1.1, code=404, message=NOT FOUND, url=https://api.mailgun.net/v2/website.ro/messages}
11:42:03.051 [QuartzScheduler_Worker-2] WARN alfio.manager.system.MailgunMailer - sending email was not successful:Response{protocol=http/1.1, code=404, message=NOT FOUND, url=https://api.mailgun.net/v2/website.ro/messages}
Also the mailgun api url is old, the new one is v3: https://api.mailgun.net/v3/website.ro/messages
To Reproduce
Steps to reproduce the behavior:
Configure mailgun api, then try sending reservation email. Mail never received.
Expected behavior
Well, to send mail :). Confirgured SMTP option with mailgun and works flawless.
The text was updated successfully, but these errors were encountered: