If you would like to use CFMAIL tag in your application you will need to set a username / password and a server in the CFMAIL tag. The from email address is recommended to be an email address on the server that is listed in the "server" option as some mail services will block it. You can use the reply-to option to ensure any replies go to the correct email address. The username and password must be for a valid email address setup within your cPanel control panel (Email Accounts) or the mail server you are pointing too. You can add new email accounts in cPanel easily by logging into your cPanel control panel or your email service provider.
Example script using CFMAIL:
<cfmail to="firstname.lastname@example.org" replyto="email@example.com" from="firstname.lastname@example.org" subject="My Subject" server="localhost" username="email@example.com" password="email-password">
Hello, this is my email!
If your mail service is a remote email service provide please ensure the server setting is set to the mail servers IP or mail domain.
For more code examples check out our Gibhub repo: https://github.com/hostmedia/ColdFusionExamples/