class Mailer::Message

Defined in:

mailer.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def 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")

[View source]
def attachments : Array(Mailer::Attachment) #

[View source]
def bcc(email, name) #

Add BCC with name

email.cc("[email protected]", "Bob")

[View source]
def bcc(email) #

Add BCC

email.cc("[email protected]")

[View source]
def bcc : Array(Mailer::Recipient) #

[View source]
def cc(email, name) #

Add CC with name

email.cc("[email protected]", "Bob")

[View source]
def cc(email) #

Add CC

email.cc("[email protected]")`

[View source]
def cc : Array(Mailer::Recipient) #

[View source]
def from : String #

[View source]
def from=(from : String) #

[View source]
def html : String #

[View source]
def html=(html : String) #

[View source]
def inline : Array(Mailer::Attachment) #

[View source]
def 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")

[View source]
def send #

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

email.send

[View source]
def send? #

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

email.send?

[View source]
def subject : String #

[View source]
def subject=(subject : String) #

[View source]
def text : String #

[View source]
def text=(text : String) #

[View source]
def to(email, name) #

Add recipient with name

email = Mailer::Mailgun::Message.new
email.to("[email protected]", "Cris Ward")

[View source]
def to(email) #

Add a recipient

email = Mailer::Mailgun::Message.new
email.to("[email protected]")

[View source]
def to : Array(Mailer::Recipient) #

[View source]