portfolio-website
portfolio-website copied to clipboard
Contact Form <[email protected]>
Hi, I've a question, what should we do with the "from" prop that we hardcode with "Contact Form [email protected]" ?? Shouldn't the senderEmail go there? Because when I put it on it doesn't work. Thx!!!!
you can put the sender's email to the "from" property of the resend.emails.send() function by doing so
try {
await resend.emails.send({
from: `${senderEmail} <[email protected]>`,
to: "[email protected]", // can only send to the email that has been registered in the resend website.
subject: "Contacting from the portfolio",
reply_to: senderEmail as string,
react: React.createElement(Email_styled, {
message: message as string,
senderEmail: senderEmail as string,
}),
});
} catch (e: unknown) {
return giveMeTheError(e);
}
Okay thanks, I tested it and fails but I think that it's because I need a domain (it's seems that vercel's domains also doesn't work) to verify into Resend server.