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"