Aller au contenu

utils/effects/smtp

Ce contenu n’est pas encore disponible dans votre langue.

Defined in: studiocms/packages/studiocms/src/utils/effects/smtp.ts:139^

SMTPMailer service for sending emails.

This service provides methods to send emails using the SMTP protocol. It uses the configuration provided by the SMTPTransportConfig context.

The type of the service.

  • any

new SMTPMailer(): SMTPMailer

SMTPMailer

Effect.Service<SMTPMailer>()(
'studiocms/lib/effects/smtp/SMTPMailer',
{
effect: genLogger('studiocms/lib/effects/smtp/SMTPMailer.effect')(function () {
const config = yield buildTransporterConfig;
const { getVersionString, isIdle, sendMail, verifyTransport }: SMTPMailerReturn =
yield SMTPService.pipe(buildProvide(config));
return { verifyTransport, sendMail, isIdle, getVersionString };
}),
}
).constructor

type SMTPMailerReturn = {
getVersionString: () => Effect.Effect<string, Error, never>;
isIdle: () => Effect.Effect<boolean, Error, never>;
sendMail: (mailOptions: Mail.Options) => Effect.Effect<SMTPTransport.SentMessageInfo, Error, never>;
verifyTransport: () => Effect.Effect<true, Error, never>;
};

Defined in: studiocms/packages/studiocms/src/utils/effects/smtp.ts:113^

Represents the return type for the SMTPMailer service.

getVersionString: () => Effect.Effect<string, Error, never>;

Defined in: studiocms/packages/studiocms/src/utils/effects/smtp.ts:114^

Effect.Effect<string, Error, never>

isIdle: () => Effect.Effect<boolean, Error, never>;

Defined in: studiocms/packages/studiocms/src/utils/effects/smtp.ts:115^

Effect.Effect<boolean, Error, never>

sendMail: (mailOptions: Mail.Options) => Effect.Effect<SMTPTransport.SentMessageInfo, Error, never>;

Defined in: studiocms/packages/studiocms/src/utils/effects/smtp.ts:116^

Mail.Options

Effect.Effect<SMTPTransport.SentMessageInfo, Error, never>

verifyTransport: () => Effect.Effect<true, Error, never>;

Defined in: studiocms/packages/studiocms/src/utils/effects/smtp.ts:119^

Effect.Effect<true, Error, never>


type tsMailer = typeof tsMailerConfig.$inferSelect;

Defined in: studiocms/packages/studiocms/src/utils/effects/smtp.ts:24^

TypeSafe Table definition for use in StudioCMS Integrations


type tsMailerInsert = Omit<typeof tsMailerConfig.$inferInsert, "id">;

Defined in: studiocms/packages/studiocms/src/utils/effects/smtp.ts:29^

TypeSafe Table definition for use in StudioCMS Integrations

Renames and re-exports createComponentProxy