2

I am working on an email notification project for a school district. I am using the Flutter platform and have connected to Firebase. I have added the Trigger Email extension, set up the collection in Firestore and set up a Sendgrid account for the SMTP server. I created a test email directly in the Firestore collection with the configured collection name for the Trigger Email service. My collection document in firestore looks like this:

message:
subject: Hello from Firebase!
text: This is the plain text body.
html: This is the <code>HTML</code> body
to: xxxxx@gmail.com // my receiving email address

The extension attempts to send the email but then adds this to the document a few seconds later:

delivery
attempts: 1
endTime: //a time in UTC
error: "Error: Missing credentials for "PLAIN""
leaseExpireTime: null
startTime: //a time in UTC
state: "ERROR"
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
jhbiggs
  • 78
  • 7
  • Do you use the latest version? If your SMTP password contains special characters, it might fail with earlier versions. Check [this issue](https://github.com/firebase/extensions/issues/996), maybe your problem is related. – Peter Koltai Jul 08 '22 at 16:09
  • No dice. Tried the rollback version and the updated version base on the comments on the Github post. – jhbiggs Jul 08 '22 at 17:01
  • Have you completed authentication under `Settings/Sender Authentication` in SendGrid? Have you set `SMTP connection URI` and other parameters in Trigger Email extension, under `Extension configuration`? Also, you have to provider grant the extension's service account, under `Access and roles`. – Peter Koltai Jul 08 '22 at 17:08
  • Yes, it appears all of these aspects have been set up. My SMTP connection URI is the one given on the Sendgrid set-up guide. I added the password as the api key string. Access and roles was set up through the Firebase wizard. – jhbiggs Jul 08 '22 at 20:40
  • Success! I reset the API key in sendgrid, then made sure to use a real email address and not an alias. Thanks @peter-koltai! – jhbiggs Jul 08 '22 at 21:51

0 Answers0