SmtpEmailProvider (email/smtp.provider.ts)

InsForge · backend/src/providers/email/smtp.provider.ts · typescript · Apache-2.0
email

Module exposing: SmtpEmailProvider, escapeHtml, escapeRegex, formatFromAddress

// Source: https://github.com/InsForge/InsForge | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import nodemailer from 'nodemailer';
import type Mail from 'nodemailer/lib/mailer';
import { AppError } from '@/utils/errors.js';
import { EmailTemplate } from '@/types/email.js';
import { SmtpConfigService, RawSmtpConfig } from '@/services/email/smtp-config.service.js';
import { EmailTemplateService } from '@/services/email/email-template.service.js';
import { ERROR_CODES, SendRawEmailRequest } from '@insforge/shared-schemas';
import { EmailProvider } from './base.provider.js';
import logger from '@/utils/logger.js';

function escapeHtml(value: string): string {
  return value
    .rep

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key