edgeport - v1.0.3
    Preparing search index...

    Function send

    • Sends a single message in one call: connect, authenticate, send, quit.

      A convenience wrapper over connect + SmtpSession.send for the common fire-once case. The session is always closed, even if sending throws. The shape mirrors nodemailer's transporter.sendMail so it drops into existing code with minimal change.

      Parameters

      Returns Promise<SendResult>

      The accepted recipients and the server's final reply.

      If the socket cannot be opened.

      If the server rejects the envelope or data.

      If authentication fails.

      1.0.0

      import { send } from 'edgeport/smtp';

      await send({
      hostname: 'smtp.example.com',
      auth: { username: 'me@example.com', password: 'app-password' },
      from: 'me@example.com',
      to: 'you@example.com',
      subject: 'Hello',
      text: 'Sent straight from a Worker.'
      });