Skip to content
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

Sendout stops after failing one email with Mailersend adapter #462

Closed
arifje opened this issue Mar 24, 2024 · 5 comments
Closed

Sendout stops after failing one email with Mailersend adapter #462

arifje opened this issue Mar 24, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@arifje
Copy link

arifje commented Mar 24, 2024

We switched from SendGrid to MailerSend but now sendouts are stopped completely after hitting a sending error.

This is what I found in the logs:

[2024-03-24 12:00:12] Sending batch 1 of sendout "Best posts - weekly sendout (2023)".
[2024-03-24 12:00:12] Sending of the sendout "Best posts - weekly sendout (2023)" to xxx@xxx.xxx failed after 3 send attempt(s). Please check that your Campaign email settings are correctly configured and check the error in the Craft log.

2024-03-24 12:00:12 [queue.ERROR] [yii\symfonymailer\Mailer::sendMessage] Unable to send an email: There are some warnings for your request. {"memory":79412944} 

Email settings are checked and valid. Did a test on the preview, works perfect, email received. In the Mailersend logs I see that 30-40 emails of this sendout are sent, but everything stops after hitting this error.

EDIT: could also be a bug in the Mailersend adapter, not sure though

@arifje arifje added the bug Something isn't working label Mar 24, 2024
@bencroker
Copy link
Collaborator

bencroker commented Mar 24, 2024

You’re likely hitting MailerSend’s rate limit of 120 emails per minute, see https://www.mailersend.com/help/rate-limits-how-to-reduce-403-422-429-errors#rate-limit-errors

Please refer to #451 for ways to resolve this and let me know if anything is unclear.

@arifje
Copy link
Author

arifje commented Mar 24, 2024

Hi Ben, thanks for the reply.

It was indeed the rate limit, but apparently they have another API endpoint for sending bulk emails: https://developers.mailersend.com/api/v1/email.html#send-bulk-emails

Is there a way to get this in the campaign plugin easily?

@bencroker
Copy link
Collaborator

You’d first need to request that feature be added to the MailerSend plugin, which is what I assume you are using as a mailer adapter. Even then, however, the campaign plugin sends one email at a time, and changing this behaviour based on the mailer adapter used is not likely to ever happen.

@bencroker
Copy link
Collaborator

FYI I created an issue at studioespresso/craft-mailersend#2.

@arifje
Copy link
Author

arifje commented Mar 24, 2024

Thanks, that makes sense!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants