|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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? |
|
#4
|
|||
|
|||
|
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> |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > CFMAIL question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|