Search code examples
firebaseemailtriggerszoho

Using Zoho mail with Trigger Email from Firestore


I have my own domain, lets say it is mydomain.com and with that domain I have setup Zoho mail, because it is free up to five addresses. I am trying to create SMTP_CONNECTION_URI for this firebase extesion, but it always fails on smtp authentification.

When creting the URI I was inspired what Zoho has provided

https://www.zoho.com/mail/help/zoho-smtp.html#alink2

My URI looks like this:

smtps://[email protected]:[email protected]:465

I have also tried using smtppro.zoho.com and with no success.

I have also tried smtp.

I have also tried port 587

I have also tried without password and provided password as ENV variable as stated by the extension

Secure format: smtps://[email protected]@smtp.gmail.com:465 (username only) smtps://smtp.gmail.com:465 (No username and password) Backwards Compatible (less secure): smtps://[email protected]:[email protected]:465. (username and password)

Different combinations listed above were tried, but with no success.

Here is the error message provided by extension:

enter image description here

I was expecting it to work, since I think I have followed all instructions provided by the documentation, but correct me if I am wrong.

Thanks


Solution

  • The issue was, that I was testing it from emulator. When setting up an emulator it asks for a password, but it puts the password inside firestore-send-email.secret.local and the passowrd is not being used. Solution is to put the passowrd inside firestore-send-email.env to variable as this SMTP_PASSWORD=mypass