Back

[SOLVED] how to add email verification in appwrite for reactjs application ?

  • 0
  • Web
  • Cloud
Drake
23 Oct, 2023, 18:25

so it shouldn't fall under spam... since it's the same sender in both cases..

TL;DR
Solution: To add email verification in an Appwrite for ReactJS application, follow these steps: 1. Disable the custom SMTP settings. 2. Set the following environment variables for SMTP configuration: - `_APP_SMTP_HOST`: Set this to the SMTP server host of your machine. - `_APP_SMTP_PORT`: Set this to the SMTP server port. - `_APP_SMTP_SECURE`: Set this to `true` if your SMTP server requires a secure connection (e.g., SSL or TLS). - `_APP_SMTP_USERNAME`: Set this to the username for your SMTP server authentication. - `_APP_SM
Drake
23 Oct, 2023, 18:25

oh you're using a custom SMTP....

Drake
23 Oct, 2023, 18:26

something is probably wrong with this configuration then

Drake
23 Oct, 2023, 18:27

username should be that postmaster email, not 12Blog

Drake
23 Oct, 2023, 18:28

the from email should probably also be the postmaster email

Arti Gaund
23 Oct, 2023, 18:33

you mean i shouldn't add my email in those field?

Arti Gaund
23 Oct, 2023, 18:53

still same issue

Drake
23 Oct, 2023, 18:55

did you fix the from email in this template?

Arti Gaund
23 Oct, 2023, 18:59

yes

Drake
23 Oct, 2023, 19:01

what's your project id? and do you have any logs in mailgun?

Arti Gaund
23 Oct, 2023, 19:02

VITE_APPWRITE_PROJECT_ID = "651ef7ae681303e19f3c"

Arti Gaund
23 Oct, 2023, 19:05

no logs in mailgun

Drake
23 Oct, 2023, 19:05

i can't find anything for this, but im pretty sure your problem is an incorrect from email

Drake
23 Oct, 2023, 19:06

make sure there are no other extra spaces

Drake
23 Oct, 2023, 19:07

also, make sure you added the recipient as an authorized recipient in mailgun

Arti Gaund
23 Oct, 2023, 19:08

can verification be done without using 3rd party SMTP configuration?

Drake
23 Oct, 2023, 20:25

Yes, you can use Appwrite's SMTP out of the box if you disable the custom SMTP

Arti Gaund
24 Oct, 2023, 09:37

do i have to remove from template also? and code will remain same ?

Arti Gaund
24 Oct, 2023, 09:57

and how to enable these ? ```_APP_SMTP_HOST`: Set this to the SMTP server host of your machine.

  • _APP_SMTP_PORT: Set this to the SMTP server port.
  • _APP_SMTP_SECURE: Set this to true if your SMTP server requires a secure connection (e.g., SSL or TLS).
  • _APP_SMTP_USERNAME: Set this to the username for your SMTP server authentication.
  • _APP_SMTP_PASSWORD: Set this to the password for your SMTP server authentication.``` when i using cloud ?
Drake
24 Oct, 2023, 15:00

you don't

Drake
24 Oct, 2023, 15:01

only disable the custom SMTP settings

Drake
24 Oct, 2023, 15:01

yes, front end code stays the same

Arti Gaund
24 Oct, 2023, 16:38

and what about the smtp template?

Arti Gaund
24 Oct, 2023, 16:43

Done. I got the verification link in gmail. Thanks. πŸ™‚

Drake
24 Oct, 2023, 17:25

[SOLVED] how to add email verification in appwrite for reactjs application ?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more