Hej!
Wlasnie pisze w jednym ze swoich projektow wysylanie maili i zerknalem do dokumentacji jak to zrobic bo nie pamietalem jak. W dokumentacji mozemy zobaczyc taki przyklad
import { EmailTemplates } from "sealious";
const message = await SimpleTemplate(ctx.$app, {
text: "Click this link to finish registration:",
subject: "Rejestracja w zmagazynu.pl",
to: ctx.$body.email as string,
buttons: [
{
text: "Finish registration",
href: `${ctx.$app.manifest.base_url}/finish-registration?token=${some_token}`,
},
],
});
message.send(ctx.$app);
Natomiast ja musialem zrobic cos takiego
const message = await EmailTemplates.Simple(ctx.$app, {
text: "Click this link to finish registration:",
subject: "Rejestracja w zmagazynu.pl",
to: ctx.$body.email as string,
buttons: [
{
text: "Finish registration",
href: `${ctx.$app.manifest.base_url}/finish-registration?token=${some_token}`,
},
],
});
Wydaje mi sie ze SimpleTemplate
jest przekopiowany gdzies z kodu zrodlowego sealiousa, ale exportujemy te funkcje jako EmailTemplates.Simple
i stad ta roznica