class

Mailer::Message

Inherits Reference / Object

Constructors

Instance methods

attachment=(attachment : Attachment)

Add Attachment Can be called mutlple times to add multiple attachments

email.attachment = Mailer::Attachment.new(filename:"logo.jpg" , path: "./storage/public/images/logo.jpg")
Source
attachments
Source
bcc(email, name)

Add BCC with name

email.cc("bob@here.com", "Bob")
Source
bcc(email)

Add BCC

email.cc("bob@here.com")
Source
cc(email, name)

Add CC with name

email.cc("bob@here.com", "Bob")
Source
cc(email)

Add CC

email.cc("bob@here.com")`
Source
from
Source
from=(from : String)
Source
html
Source
html=(html : String)
Source
inline
Source
inline=(attachment : Attachment)

Add Inline attachment (usually image) Can be called mutlple times to add multiple attachments

<p>Some content <image src="cid:hello.jpg" />
email.attachment = Mailer::Attachment.new(filename:"hello.jpg" , path: "./storage/public/images/hello.jpg")
Source
send

Sends the email, raises if the send fails, returns message info on success

email.send
Source
send?

Sends the email, returns message info on success, null on fail

email.send?
Source
subject
Source
subject=(subject : String)
Source
text
Source
text=(text : String)
Source
to(email, name)

Add recipient with name

email = Mailer::Mailgun::Message.new
email.to("user@email.com", "Cris Ward")
Source
to(email)

Add a recipient

email = Mailer::Mailgun::Message.new
email.to("user@email.com")
Source