I have a function that sends e-mail which works fine in it's basic form. However I need to add in params for images and attachments and can't find any documentation other than the basic cfmail() functionality.
cfmail(
to = arguments.emailTo,
from = arguments.emailFrom,
subject = arguments.emailSubject,
type = 'html'
) {
writeOutput(arguments.mailbody);
}
I feel they should be up above the mailbody but can't find any docs on how to add them.
The linked documents above are great for new mail(), but - at least what I saw - were not updated for the newer cfmail() function. Here's the solution that also includes a boolean if one image is optional. I also found that in the included e-mail body, CID: does not show the image in Outlook (but is fine in Gmail), but cid: works in both.