I want to use a custom template for my verify email and forgot password mails, and I don’t think Appwrites current template has allowances for what I want to create (a template with images, custom font etc). How can I achieve this?
I tried using a template I created and pass in the data from the createVerification object, but secret keeps returning an empty string
Pass in data from create verification object? What do you mean?
You should be able to define a custom template in the console after adding a custom project SMTP
I mean, i tried to manually pass in the data returned when you create an email verification (https://appwrite.io/docs/references/cloud/client-web/account#createVerification) but it doesn’t return the secret
Sorry, I don't understand. Maybe you can share a screenshot or code to give more context?
Can I add an image in this custom template?
const res = await account.createVerification(${BASE_URL}/about);
const firstName = user?.name.split(' ')[0];
const redirectLink = ${BASE_URL}/about?userId=${res.userId}&secret=${res.secret}&expire=${res.expire};
// plug in verification data to template
await axios.post('/api/welcome-user', {
to: email,
title: `Welcome, ${firstName}!`,
redirectLink,
});
This is what I mean
Btw, it's best to use 3 back ticks with multi-line code. See https://www.markdownguide.org/extended-syntax/#syntax-highlighting
No, that's not how you customize the emails
Noted. Thank you
Is the only way to go about it from the console? With custom a SMTP server?
Alright, thank you
Recommended threads
- encrypt and decrypt buckets
I have a bucket where I switched from encryption to not encrypting files. I later realized that files already uploaded earlier stay encrypted. Now I have a buck...
- Unable to Create Storage After Upgrading...
We upgraded our Appwrite instance from version 1.8.0 to 1.9.0 and successfully ran the migration process. However, after the upgrade, we are no longer able to c...
- I can't UNPAUSE my project with the free...
I received an email notifying me that my project had been paused due to inactivity, and the email included a link to "Restore project." However, that button red...