struct

Alumna::Mail

Inherits Struct < Value < Object

One outbound message. The app builds it and passes it to Mailer#send. There is no built-in mail rule in this release.

to accepts one address or a list. The struct keeps its own list. A later change to the caller's array does not change this mail.

Empty from, empty to, or empty subject raises ArgumentError. An empty address in to raises ArgumentError. An empty reply_to raises ArgumentError. Omit reply_to when there is none.

A CR or LF in from, subject, reply_to, or an address in to raises ArgumentError. These values go into mail headers and SMTP commands. A line break there lets a caller add headers or commands (header injection). text and html can contain line breaks. An adapter encodes the body.

Constructors

new(*, from : String, to : String | Array(String), subject : String, text : String, html : String | Nil = nil, reply_to : String | Nil = nil)
Source

Instance methods

from
Source
html
Source
reply_to
Source
subject
Source
text
Source