I am setting up an CFMAIL to notify the person who posts a message on the discussion board that their message has been posted and who has received notification of the post. As you can see, "To" and "From" are the same person. The way our email system is set up, the names of the sender and receipient are shown as "LastName, FirstName". To keep that same look I have set the following variables:
And, here is my CFMAIL:
The problem I am having is this: If SenderEmailName has a comma in it, I get two messages. The first one is a notification from the system that my message was undeliverable. It shows that it tried to deliver to "LastName". Immediately after that, I receive the correct email with "From" showing the last name only, and "To" showing LastName;FirstName separated by a ";". If I take out the comma in SenderEmailName, it works fine. Any ideas?
Trust me to find the wierd stuff, huh? Calista :-X
Jedi Knight,
Champion of the Force
Code:
<CFSET SenderEmail = "#GetSenderName.PersonEmail#">
<CFSET SenderEmailName = "#GetSenderName.PersonLastName#, #GetSenderName.PersonFirstName#">
Code:
<CFMAIL TO="#SenderEmailName# <#SenderEmail#>"
FROM="#SenderEmailName# <#SenderEmail#>"
SUBJECT="#GetForumProduct.ForumName#"
TYPE="HTML">
<CFMAILPARAM NAME="Date" VALUE="#dateString#">
The following people have been notified of your post<BR>
to the <A HREF="#Application.RootPath#Discussion/DiscussionIndex.cfm?Forum=#GetForumProduct.ForumID#">#GetForumProduct.ForumName#</A> Forum:<BR><BR>
#NewList#
</CFMAIL>
Trust me to find the wierd stuff, huh? Calista :-X
Jedi Knight,
Champion of the Force