How to Send Email Through JangoSMPT Via ColdFusion
The ColdFusion language includes libraries to send email through your SMTP server, the main protocol for sending messages over the Internet. You can use the "cfmail" ColdFusion tag with the JangoSMTP libraries to send email from your Web pages. The setup is similar to the normal SMTP code, but you must include the JangoSMTP library files in your ColdFusion file before you can use the functions for email.
Instructions
-
-
1
Open the ColdFusion software and open the Web project you want to edit. Double-click the code file you plan to use to send the email.
-
2
Add the libraries for JangoSMTP to the top of the code file. The following code adds the mail libraries to your ColdFusion page:
<cfimport taglib="jangofolder" prefix="mail">
Replace "jangofolder" with the folder in which you store JangoSMTP.
-
-
3
Create the mail object in your page. The following code creates the email message:
<cfmail to="te_email"
from="youremail@me.com"
subject="JangoEmail"
type="text">
Your message
</cfmail>Substitute each of the email parameters with your own.
-
4
Display a confirmation page on the user's browser. This confirmation sends feedback to the user, so the user knows the email was sent. Add the following code to show a confirmation:
<cfoutput>
Your email has been sent.
</cfoutput>
-
1