
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
- Auth Error
"use client"; import { useEffect } from "react"; import { getSessionCookie } from "@/actions/auth"; import { createBrowserSessionClient } from "@/lib/appwrite-...
- Cannot connect to SMTP in AppWrite - set...
This used to work and then at some point it stopped. One thing that happened in that time was moving my application to Vercel. I have read on another thread t...
- Prevent modifying specific attributes
How do I prevent user to only to be able to modify some of the attributes. Document level security gives full access to update whole document, what are the wor...
