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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cfmail Error

Status
Not open for further replies.

peter11

Instructor
Joined
Mar 16, 2001
Messages
334
Location
US
Below is the message and corresponding code, (37:1) to (40:32) refer to the cfmail tag
Message:
Error Diagnostic Information
unknown exception condition

TagCFMail::sendMessage

The error occurred while processing an element with a general identifier of (CFMAIL), occupying document position (37:1) to (40:32).


Date/Time: 03/06/02 10:35:52
Browser: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)



CF Code:
<CFQUERY NAME=&quot;GetPassword&quot; DATASOURCE=&quot;login&quot;>
SELECT *
FROM users
WHERE username = '#user#'

</CFQUERY>




<CFMAIL
QUERY =&quot;GetPassword&quot;
TO=&quot;#Email#&quot;
FROM=&quot;passwords@xxx.com&quot;
SUBJECT=&quot;Your password&quot;
>
Dear #firstname# #realname#,

our <B>NEW</b> password is <b>>#Password#.</B><BR>
</CFMAIL>

Thanks
 
Is this a typo in your message or your code?
Dear #firstname# #realname#,

our <B>NEW</b> password is <b>>#Password#.</B><BR> Calista :-X
Jedi Knight,
Champion of the Force
 
I checked that but it is still failing.
Could there be a server side issue?
 
I don't think it's a server issue. Try adding the &quot;TYPE&quot; attribute like this:

<CFMAIL
QUERY =&quot;GetPassword&quot;
TO=&quot;#Email#&quot;
FROM=&quot;passwords@xxx.com&quot;
SUBJECT=&quot;Your password&quot;
TYPE=&quot;HTML&quot;>

Dear #firstname# #realname#,

our <B>NEW</b> password is <b>#Password#.</B><BR>
</CFMAIL>

The &quot;TYPE&quot; attribute is not required, but since you have HTML tags in your message, that might be it.

Also, make sure the closing &quot;>&quot; is on the same line as the last line of the tag, and not on a line by itself. Calista :-X
Jedi Knight,
Champion of the Force
 
I tried that as well. This is driving me nuts!
 
OK, NEXT!

Try enclosing the &quot;To&quot; and &quot;From&quot; in <> as shown:

<CFMAIL
QUERY =&quot;GetPassword&quot;
TO=&quot;<#Email#>&quot;
FROM=&quot;<passwords@xxx.com>&quot;
SUBJECT=&quot;Your password&quot;
TYPE=&quot;HTML&quot;>
Calista :-X
Jedi Knight,
Champion of the Force
 
I tried and still no go.
Calista, I really appreciate your help
 
Well, Peter, I don't know what to tell you. I copied your code onto a default template, ran a query on my own database, changed the appropriate variable names, and it worked perfectly. Here it is:

<CFQUERY NAME=&quot;GetPassword&quot;
DATASOURCE=&quot;#Application.Datasource#&quot;>
SELECT PersonFirstName, PersonLastName, PersonEmail
FROM PersonTable
WHERE PersonFirstName = 'Dian'
</CFQUERY>

<CFSET Password = &quot;NewPassword&quot;>

<CFMAIL
QUERY =&quot;GetPassword&quot;
TO=&quot;#PersonEmail#&quot;
FROM=&quot;Buzz&quot;
SUBJECT=&quot;Your password&quot;
TYPE=&quot;HTML&quot;>

Dear #personfirstname# #personlastname#,

our <B>NEW</b> password is <b>#Password#.</B><BR>
</CFMAIL>

I guess someone else is going to have to jump in on this one. At this point, it's probably worth making sure you're connected to the mail server. However, when that happened to me (MIS changed the mail server without telling me!), the templete didn't throw an error, it just didn't send the message and stuck it in the UNDLVR folder.
Calista :-X
Jedi Knight,
Champion of the Force
 
Maybe it's a stupid remark, but is there a mailserver running on the webserver?

Try this :
<CFMAIL
QUERY =&quot;GetPassword&quot;
TO=&quot;#Email#&quot;
FROM=&quot;passwords@xxx.com&quot;
SUBJECT=&quot;Your password&quot;
SERVER=&quot;xxx.xxx.xxx.xxx&quot; OR &quot;mail.yourdomain.com&quot;
>

Make sure that relaying from the ip address of your webserver or domain is allowed.
 
Thanks Everybody,
the issue was with not allowing full access to CFUSION\MAIL

-Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top