class Mailer::Message
- Mailer::Message
- Reference
- Object
Defined in:
mailer.crConstructors
Instance Method Summary
-
#attachment=(attachment : Attachment)
Add Attachment Can be called mutlple times to add multiple attachments
- #attachments : Array(Mailer::Attachment)
-
#bcc(email, name)
Add BCC with name
-
#bcc(email)
Add BCC
- #bcc : Array(Mailer::Recipient)
-
#cc(email, name)
Add CC with name
-
#cc(email)
Add CC
- #cc : Array(Mailer::Recipient)
- #from : String
- #from=(from : String)
- #html : String
- #html=(html : String)
- #inline : Array(Mailer::Attachment)
-
#inline=(attachment : Attachment)
Add Inline attachment (usually image) Can be called mutlple times to add multiple attachments
-
#send
Sends the email, raises if the send fails, returns message info on success
-
#send?
Sends the email, returns message info on success, null on fail
- #subject : String
- #subject=(subject : String)
- #text : String
- #text=(text : String)
-
#to(email, name)
Add recipient with name
-
#to(email)
Add a recipient
- #to : Array(Mailer::Recipient)
Constructor Detail
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")
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")
def to(email, name)
#
Add recipient with name
email = Mailer::Mailgun::Message.new
email.to("[email protected]", "Cris Ward")