Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Sending email with cold fusion

Posted on 2004-04-08
7
Medium Priority
?
265 Views
Last Modified: 2013-12-24
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

Thanks,
Ashraf
0
Comment
Question by:asamuel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 17

Expert Comment

by:anandkp
ID: 10783390
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
<CFMAIL .. MAILSERVER="100.9.89.45">

<P>
This example uses cfmailparam to attach two files and add a
header to a message.
</P>
<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
</cfmail>
</body>
</html>    

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

K'Rgds
Anand
0
 

Author Comment

by:asamuel
ID: 10783463
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.

Thanks,
0
 
LVL 17

Expert Comment

by:anandkp
ID: 10783712
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">
</cfquery>
3. <cfmail query="users" ...>
 html data here to inform all users in the list above ...
add a link here if required
</cfmail>

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 !
0
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 

Author Comment

by:asamuel
ID: 10783786
O.K. I am almost there,
So How do I create the link belong to these information.
0
 
LVL 17

Accepted Solution

by:
anandkp earned 1500 total points
ID: 10783853
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
</cfquery>

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

</cfoutput>

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 ...

hth

K'Rgds
Anand
0
 
LVL 17

Expert Comment

by:anandkp
ID: 10789921
hello ?
0
 
LVL 6

Expert Comment

by:devtha
ID: 20666973
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.
0

Featured Post

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question