delivery_methods/smtp.rb

mail · lib/mail/network/delivery_methods/smtp.rb · ruby · MIT
email

SMTP delivery method for sending emails via Net::SMTP, supporting TLS, STARTTLS, and custom settings.

# Source: https://github.com/mikel/mail | License: MIT
# Provided via justclaw.it.com; keep this notice with the code.
# frozen_string_literal: true
require 'mail/smtp_envelope'

module Mail
  # == Sending Email with SMTP
  #
  # Mail allows you to send emails using SMTP.  This is done by wrapping Net::SMTP in
  # an easy to use manner.
  #
  # === Sending via SMTP server on Localhost
  #
  # Sending locally (to a postfix or sendmail server running on localhost) requires
  # no special setup.  Just to Mail.deliver &block or message.deliver! and it will
  # be sent in this method.
  #
  # === Sending via MobileMe
  #
  #   Mail.defaults do
  #     delivery_method :smtp, { :address              => "smtp.me.com",
  #                              :port                 => 587,
  #              

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

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

Get a free API key