ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 11th, 2005, 02:01 PM
DPVA94 DPVA94 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: Richmond, Virginia USA
Posts: 9 DPVA94 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 17 sec
Reputation Power: 0
Send a message via ICQ to DPVA94 Send a message via AIM to DPVA94
CFMAIL question

I am trying to create a form that when you select the email subject from a list, it will automatically send emails with a particular subject to a particular person. For example, on our website, web site related emails need to go to one person, patient data information needs to go to another, and so on.

I would appreciate any help that you could give me.

Reply With Quote
  #2  
Old October 11th, 2005, 02:48 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,655 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 13 h 29 m 8 sec
Reputation Power: 53
The most straightforward option would just be to pass the subject to your mail action page, and based on the subject you could use cfswitch or cfif to set the recipient(s).
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
  #3  
Old October 11th, 2005, 03:11 PM
DPVA94 DPVA94 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: Richmond, Virginia USA
Posts: 9 DPVA94 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 17 sec
Reputation Power: 0
Send a message via ICQ to DPVA94 Send a message via AIM to DPVA94
Thanks for the tip! I am still new to the whole CF side of things, they don't give me a lot of "recreational programming" time as of late due to NIH grant deadlines, but things look to be loosening up in that regard.

I am going to try to code this myself, I think I know enough to do it. If needed though, could I ask questions later?

Reply With Quote
  #4  
Old October 11th, 2005, 03:33 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,655 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 13 h 29 m 8 sec
Reputation Power: 53
I recommend reading Ben Forta's books, they are excellent, not very expensive, and will get you up to speed on CF very quickly.

The implementation of this basic approach is quite simple, something like this:

<cfset form.subject = "Web Site Issues" />
<cfswitch expression="#form.subject#">
<cfcase value="Business Information">
<cfset recipientList = "joe@foo.com" />
</cfcase>
<cfcase value="Web Site Issues">
<cfset recipientList = "joe@foo.com;websupport@foo.com" />
</cfcase>
<cfcase value="Some Other Subject">
<cfset recipientList = "rick@foo.com" />
</cfcase>
<cfdefaultcase>
<cfset recipientList = "support@foo.com" />
</cfdefaultcase>
</cfswitch>

<cfmail to="#recipientList#">
...
</cfmail>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > CFMAIL question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway