The following code demonstrates the typical way to send email using ColdFusion (CFML) out-of-the-box. You can also configure a mail server in the Lucee Administrator. This has the added benefit of not having to configure your code with plain-text passwords. Additionally, there are more modern ways of sending email, which are only supported in the Lucee administrator.
<cfmail to="recpient@example.com"
from="Your From Name <from@your-domain.com>"
server = "127.0.0.1"
port="465"
useSSL="true"
username = "from@your-domain.com"
password = "Your Case Sensitive Password"
subject="Your Subject"
type="html">
This is the body of your email. You are sending the message as HTML then you should include HTML formatting.
</cfmail>
If you have configured a mail server in the Lucee Administrator:
<cfmail to="recpient@example.com"
from="Your From Name <from@your-domain.com>"
subject="Your Subject"
type="html">
This is the body of your email. You are sending the message as HTML then you should include HTML formatting.
</cfmail>