Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Another pesky CFMAIL problem!

Status
Not open for further replies.

calista

Programmer
Jan 24, 2001
545
US
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:
Code:
<CFSET SenderEmail = &quot;#GetSenderName.PersonEmail#&quot;>
<CFSET SenderEmailName = &quot;#GetSenderName.PersonLastName#, #GetSenderName.PersonFirstName#&quot;>
And, here is my CFMAIL:
Code:
<CFMAIL TO=&quot;#SenderEmailName# <#SenderEmail#>&quot;
        FROM=&quot;#SenderEmailName# <#SenderEmail#>&quot;
        SUBJECT=&quot;#GetForumProduct.ForumName#&quot;
		TYPE=&quot;HTML&quot;>
		<CFMAILPARAM NAME=&quot;Date&quot; VALUE=&quot;#dateString#&quot;> 
		The following people have been notified of your post<BR>
		to the <A HREF=&quot;#Application.RootPath#Discussion/DiscussionIndex.cfm?Forum=#GetForumProduct.ForumID#&quot;>#GetForumProduct.ForumName#</A> Forum:<BR><BR>
		#NewList# 
</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 &quot;LastName&quot;. Immediately after that, I receive the correct email with &quot;From&quot; showing the last name only, and &quot;To&quot; showing LastName;FirstName separated by a &quot;;&quot;. 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
 
P.S. Nothing shows up in &quot;Undelivr&quot;. Calista :-X
Jedi Knight,
Champion of the Force
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top