You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @meghein,
trying to use @autotelic/fastify-mail 0.8.0 with Fastify 4.26 , Typescript 5.4 and Node 20.11.
I have trouble to pass the correct opts object to fastify.mailer.sendMail method.
I cannot instanciate correctly your package. Can you support me please ? Here a reproducible project.
Thank you in advance.
Into plugins folder I have this file to register the plugin:
/// <reference path="../global.d.ts" />
import { FastifyInstance, FastifyPluginOptions } from "fastify";
const mail = require("@autotelic/fastify-mail")
const defaults = {
from: "John Doe <[email protected]>",
subject: "Hello world",
};
const transport = {
provider: "mailtrap", // using aws to send email
pool: true,
host: "sandbox.smtp.mailtrap.io",
port: 2525,
secure: false, // use TLS
auth: {
user: "xxxxxxxxxxxxx",
pass: "yyyyyyyyyyyyy",
},
};
export default async function (
fastify: FastifyInstance,
opts: FastifyPluginOptions
) {
await fastify.register(mail, { pov: { engine: { nunjucks: require('nunjucks') } }, transporter: transport })
fastify.log.debug("Registered plugin autotelic-fastify-mail");
}
Hi @meghein,
trying to use
@autotelic/fastify-mail 0.8.0
withFastify 4.26
,Typescript 5.4
andNode 20.11
.I have trouble to pass the correct
opts
object tofastify.mailer.sendMail
method.I cannot instanciate correctly your package. Can you support me please ?
Here a reproducible project.
Thank you in advance.
Into
plugins
folder I have this file to register the plugin:global.d.ts
routes\root.ts
package.json
The text was updated successfully, but these errors were encountered: