Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

How to add URL to forgot password email? And how to custom that email?

default discord avatar
IRediTOTOlast year
1 2

Hi, I'm trying to send and custom email. Is there a function in PayloadCMS ready to send email
Ex:

payload.email.send("abc@gmail.com",{
body: "Here is custom html",...
})

When I recieved email forgot password, I lost the domain, how can I config it?
image

  • Selected Answer
    discord user avatar
    jacobsfletch
    last year

    Hi @IRediTOTO, yes you can send email with Payload using the payload.sendEmail method as long as email has been configured. Here's the docs related to that: https://payloadcms.com/docs/email/overview#email-functionality

    Then you can generate your own email using auth.forgotPassword.generateEmailHTML on your auth collection's config — more on that here: https://payloadcms.com/docs/authentication/config#forgot-password

  • default discord avatar
    mohanrajlearnlast year

    When i enter any email id in forgot password field, that is registered or non-registered emails i am getting success message in network tab.While implementing in my nextjs project for toast container, i am always getting same success message for registered or non-registered emails.How can i determine it?

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.