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
- self-hosted auth: /v1/account 404 on saf...
Project created in React/Next.js, Appwrite version 1.6.0. Authentication works in all browsers except Safari (ios), where an attempt to connect to {endpoint}/v1...
- Having issues with login via CLI
``` ~/appwrite appwrite login --endpoint https://localhost/v1 --verbose ? Enter your email myvalidemai...
- delete document problems
i don't know what's going on but i get an attribute "tournamentid" not found in the collection when i try to delet the document... but this is just the document...