📧Sending Mail
Up up and away!
Helper
// Mixin Helper Approach
newMail(
to : "[email protected]",
from : "[email protected]",
subject : "Mail Services Rock",
type : "html", // Can be plain, html, or text
bodyTokens : {
user : "Luis",
product : "ColdBox",
link : event.buildLink( 'home' )
}
)
.setBody("
<p>Dear @user@,</p>
<p>Thank you for downloading @product@, have a great day!</p>
<p><a href='@link@'>@link@</a></p>
")
.send()
.onSuccess( function( result, mail ){
// Process the success
})
.onError( function( result, mail ){
// Process the error
});Delegate
MailService
Mail Payload
Constructor
Send()
Callbacks
Changing Mailers
Body Tokens
Rendering Views
Mail Attachments
Signature
Example
Mail Params
Signature
Example
Mail Parts
Signature
Example
Mail Helper Methods
Mail Additional Info
Last updated
Was this helpful?