• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 272
  • Last Modified:

Sending email with cold fusion

I have cold fusion install on web server, and i setted up the mail information,I don't know how
can i send email with attachment, or how can i create link in the email for information submitted to database

  • 4
  • 2
1 Solution
Hi Ashraf,

set up the mail server IP in ur CFADMIN - if u cant access CFADMIN - ask ur sysadmin to fo it for u OR set it up in

This example uses cfmailparam to attach two files and add a
header to a message.
<cfmail from = "peter@domain.com" To = "paul@domain.com"
Subject = "See Important Attachments and Reply">
  <cfmailparam name = "Reply-To" value = "mary@domain.com">
  Please read the text file and view the new logo, and let us know what
  you think.
  <cfmailparam file = "c:\work\readme.txt">
  <cfmailparam file = "c:\work\logo.gif">

   u can have a link in ur email as :
    <a href="www.mysite.com">click here</a> to chk my site

to send HTML & Text copy of emails - use ...
<CFMAIL ....>
  <CFMAILPART type="text">
  Text version goes here
  <CFMAILPART type="html">
  <B>HTML version goes here</B>

asamuelAuthor Commented:
Hi Anand,
Thank you for the information,
I already i know most of these info, my problem is , I have form it has input fields, and when user submit this form it should insert these data into a database, and i want to send email out to group of users, I already created this to inform them about these data, so i want to have something like expert_exchange, when i get email i click on the link it show me my answer or area, so how can i do this.

ok ...

once the user has submitted the data

1. insert the data in the DB
2. get the list of people need to be informed
<cfquery name="users">
3. <cfmail query="users" ...>
 html data here to inform all users in the list above ...
add a link here if required

this way u notify them abt the changes done ...

u can also inlcude a link there ... so they can clikc on it & come over to the relavent page !
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

asamuelAuthor Commented:
O.K. I am almost there,
So How do I create the link belong to these information.
since ur inserting the data in a DB Table ... i suppose u are marking that "notes" with some ID [identifier]

have a cfm page that wld use this ID to show the relavent information eg :

<cfquery name"x">
select * from table where ID = 34

<cfoutput name="x">
 display the data here ....


save teh above as a display page ... so then u can give users a link like <a href="www.ursite.com/displaypage.cfm?id=34">cilck here to seee</a>

so the above query will take the input parameter as 34 & show teh data related to 34

if after that somebody else comments .. the email will be fired with link as <a href="www.ursite.com/displaypage.cfm?id=35">cilck here to seee</a>

& so on & so forth ...


hello ?
This is an old post but I need some help.
CF version 7 -- does anyone know how to attach docs in emails?
We are getting ColdFusion Event Gateway errors.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now