Error: Mail command failed: 550 5.7.1 when trying to send e-mail from Firebase Functions

229 views Asked by At

I've tried to use nodemailer on cloud functions to send e-mails with Firestore's oncreate event. Every time I try to send an email from a cloud function, it throws the following error:

Error: Mail command failed: 550 5.7.1

It also says that I should check my MX and SPF records of my domain.

I've tried to use the following SPF records with no success:

v=spf1 include:spf.whservidor.com include:_spf.google.com include:_spf.firebasemail.com include:sendgrid.net ~all

I've also tried to use the Trigger Email from Firestore extension but got the same problem.

Does anyone know what should I include in my SPF records to get this working?

1

There are 1 answers

0
John Hanley On BEST ANSWER

The SMTP 550 error is often caused by specifying an incorrect recipient email address. The SMTP RCPT TO command is being rejected.

Double check the email address that you are sending email to.