I can't sent auth email I don't know what's happend
"use client";
import { account, databases } from "@/lib/appwrite";
import { useState } from "react";
import { ID } from "appwrite";
export const useRegisterUser = () => {
const [loading, setLoading] = useState(false);
const [error, setError] = useState(null);
const registerUser = async (data) => {
setLoading(true);
setError(null);
try {
// create user appwrite
const user = await account.create(ID.unique(), data.email, data.password);
// Send verification email
await account.createVerification("http://localhost:3000/verify-email");
setLoading(false);
return { success: true, user };
} catch (error) {
setLoading(false);
setError(error.message);
return { success: false, error };
}
};
return { loading, error, registerUser };
};
why i can't send createVerification ?? i configure my SMTP in appwrite
my messages with the same config is working
"role: guest" means you're not logged in. You need to create a session first
ok i will try
i saw to .env but there is no SMTP option
You must configure something in your .env
i did
but still nothing
i was trying figurout it by couple of hours
i think is something serious because i found this https://github.com/appwrite/appwrite/discussions/4932
i have same issue
Recommended threads
- Getting error when trying to add domain ...
we use self hosted appwrite on my company and every single time ever I tried to add a domain it shows this error on the top rigth: "Cannot read properties of un...
- Using OTP Email to verify user for passw...
Has anyone ever implemented this? If you did what was your aproach? Did you write an appwrite function?
- Transaction and Session
I've been debugging for hours a problem that now I think it's because It's not allowed: In my project a user log in using the `node-appwrite` SDK (SSR) I store...