> Could anyone tell me why I'm getting this error connecting to the mail
> server? It's happening all the time and I do not understand why.
>
> "Error","TID=688","04/12/01","02:13:52","Error occurred while
> attempting to
> connect to mail server. - [PT_NOTCONNECTED] Attempt made to use a session
> that is not the PT_CONNECTED state (Send attempted with closed
> connection)  - Server = 'mail.cmfc.net'"
> "Error","TID=688","04/12/01","02:13:52","Message not delivered
> due to error
> in establishing connection - Undelivered message file archived to
> 'C:\CFUSION\MAIL\UNDELIVR\CFM46B.TMP'"
>
> The CFMAIL tags as follows:
>
> <CFQUERY NAME="Email" DATASOURCE="cmfc">
>     SELECT * FROM EmailList
> </CFQUERY>
>
> <CFMAIL
>    TYPE="HTML"
>    TO="#email#"
>    FROM="[EMAIL PROTECTED]"
>    SUBJECT="#Form.Subject#"
>    SERVER="mail.cmfc.net"
>    PORT="25">
> #Form.Message#
> </CFMAIL>

Firstly, I'm surprised your code doesn't crash... you're building a query
called Email and then trying to send an email To that query

If you want to send an email to email addresses from a query, then you must
do it this way;
<cfmail to="#EmailField#" query="QueryName">

Personally I wouldn't name the query "Email" when it can be confused with a
field name, try;
<cfquery name="qryEmail" datasource="cmfc">
        select Email
        from EmailList
</cfquery>
<cfmail to="#Email#" query="qryEmail" from="[EMAIL PROTECTED]"
SUBJECT="#Form.Subject#" SERVER="mail.cmfc.net" PORT="25"
type="HTML">#Form.Message#</CFMAIL>

That should send to everyone in the list as long as the field is called
Email

HTH

Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to