It is very simple, you can read the API to understand it. Here is a simple breakdown until the docs are complete:
get a new mail object: getPlugin(“MailService”).newMail();
Populate it with your mail information and then you can also set a structure of name-value pairs as tokens:
Are you using 3.0? If you are, you could inject the plugin where needed and do something like below. I’m referencing it as “instance.mailSevice” because I’m injecting it but the same can be done using getPlugin() where applicable.
Get a new mail object
Configure the object’s properties. You can use the config function or setters. CFDUMP to easily see all the setters or look at coldbox/system/beans/Mail.cfc
PS. “coldbox/system/beans/Mail.cfc” may have type=“int” references that don’t work in CF8 or CF9. Change those to type=“numeric” to get it working for now.