description |
---|
cbMailServices is a module to send email in a fluent and abstracted approach. |
Sending emails doesn't have to be complicated or archaic. The ColdBox Mail Services (cbmailservices
) module will allow you to send emails in a fluent and abstract way in multiple protocols for many environments in a single cohesive API. The supported protocols are:
- CFMail - Traditional
cfmail
sending - File - Write emails to disk
- InMemory - Store email mementos in an array. Perfect for testing.
- Null - Ignores emails sent to it.
- Postmark - Send via the PostMark API Service (https://postmarkapp.com/)
- Mailgun - Send via the MailGun API Service (https://www.mailgun.com/)
It also sports tons of useful features for mail sending:
- Async Mail
- Mail Queues
- Mail merging of variables
- Mail attachments, headers, and parameters
- View and Layout+View rendering for mail
- Mail Tracking
- Multiple mailers
- Success and Error callbacks
Mailable@cbmailservices
delegate for adding mailing traits to objects.- So Much More!
newMail(
to : "email@email.com",
from : "no_reply@ortussolutions.com",
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>
")
.addAttachment( expandPath( "/tmp/reports/report.pdf" ) )
.setReadReceipt( "myemail@email.com" )
.send()
.onSuccess( function( result, mail ){
// Process the success
})
.onError( function( result, mail ){
// Process the error
});
- Lucee 5+
- Adobe ColdFusion 2018+
cbMailServices
is maintained under the Semantic Versioning guidelines as much as possible. Releases will be numbered in the following format:
<major>.<minor>.<patch>
And constructed with the following guidelines:
- Breaking backward compatibility bumps the major (and resets the minor and patch)
- New additions without breaking backward compatibility bumps the minor (and resets the patch)
- Bug fixes and misc changes bumps the patch
Apache 2 License: http://www.apache.org/licenses/LICENSE-2.0
- Code: https://github.com/coldbox-modules/cbmailservices
- Issues: https://ortussolutions.atlassian.net/browse/BOX
- Community: https://community.ortussolutions.com/
This module is professional open-source software backed by Ortus Solutions, Corp offering services like:
- Custom Development
- Professional Support & Mentoring
- Training
- Server Tuning
- Security Hardening
- Code Reviews
- Much More
Because of His grace, this project exists. If you don't like this, then don't read it, it's not for you.
"Therefore being justified by faith, we have peace with God through our Lord Jesus Christ: By whom also we have access by faith into this grace wherein we stand, and rejoice in hope of the glory of God." Romans 5:5