Skip to main content
October 23, 2009
Question

CF8 server can't send an email through Exchange Server

  • October 23, 2009
  • 1 reply
  • 2607 views

I'm sending this as an Exchange Server Administrator... I'm working w/ our ColdFusion Admin, but he's stuck... so am I.

CFv8 is our version (if you need more I'll get it) We have Exchange Server 2003 Enterprise, on Windows 2003 Server Enterprise.

From what I understand... someone is filling out a form on our CF8 Server... this form is then "sent" to the "forum administrator"  (through our Exchange 2003 server) ... This person is "outside" of our Exchange server... bob_forum_administrator@hotmail.com.

This has "Adobe Support" stumped...

I have the CF server "allowed" in the SMTP,  Virtual Server,  Relay Setting, (and allow all authenticated servers to relay.. also) 

I have a copy of his "code" too... (site details removed) ...

<cfmail to="#recipEmail#"        from="#sendersEmail#"        subject="You've got an ePostcard from Our Company!"> #recipName#,     #sendersName# sent you an ePostcard from www.ourcompany.com! You can view your card at http://www.ourcompany.com/pub/ecards/yourEcard.cfm?cardNumber=#getIDNumber.CardID#  Your card will be available for 30 days. Delivered by Our Company Send your OWN ePostcard now at http://www.ourcompany.com/pub/ecards/ </cfmail>

So if you have any ideas, please let me know.

Thank you!

JLH

    This topic has been closed for replies.

    1 reply

    Inspiring
    October 23, 2009

    So I guess the problem here is that the email isn't arriving?  You don't actually say...

    Some questions, based on that assumption:

    1) Does the connection to the Exchange server verify in CFAdmin?

    2) Have you switched all the mail logging options on, and set to DEBUG?  Anything useful being logged?

    3) Is the email failing to send from CF, or is it failing to be forwarded by Exchange?

    4) Can Exchange log failed / refused connections, and is it logging attempted connections from the CF server?

    5) Are the messages getting stuck in the spool dir on the CF server, or being placed in the undeliverable dir, or vanishing (suggesting they're being sent)

    6) What happens if you set up a simple, stand-alone, test rig with a hard-coded <cfmail> test mail to an email address within your own Exchange system?  If that works, try changing it to an "outside world" one.

    7) Anything in the CF or JRun logs?

    --

    Adam

    October 29, 2009

    Our Answers below them... I scrubbed out the "real servers and email addresses" from the answers..

    I know most of this has been sent in an Adobe Ticket by the CF admin, but I see something isn't right!.

    Some questions, based on that assumption:

    1) Does the connection to the Exchange server verify in CFAdmin?

    Yes

    2) Have you switched all the mail logging options on, and set to DEBUG?  Anything useful being logged?

    "Error","scheduler-4","10/26/09","16:20:25",,"Invalid Addresses"


    3) Is the email failing to send from CF, or is it failing to be forwarded by Exchange?

    It’s being sent by Coldfusion but getting stuck in the undeliverable dir.

    4) Can Exchange log failed / refused connections, and is it logging attempted connections from the CF server?

    I trolled all the logs for Exchange, found only one line in months of logs:

    A non-delivery report with a status code of 5.1.8 was generated for recipient rfc822;oneID@ourmailserver.com (Message-ID  <17345217.77461254879573977.JavaMail.SYSTEM@mail.ourmailserver.com>).

    10/6/2009

    8:39:45   PM

    MSExchangeTransport

    Error

    NDR

    3030

    N/A

    ourmailserver

    A non-delivery report with a status   code of 5.1.8 was generated for recipient rfc822;oneID@ourmailserver.com   (Message-ID  <17345217.77461254879573977.JavaMail.SYSTEM@ourmailserver.com>).



    5) Are the messages getting stuck in the spool dir on the CF server, or being placed in the undeliverable dir, or vanishing (suggesting they're being sent)

    They are getting stuck in the undeliverable dir.

    6) What happens if you set up a simple, stand-alone, test rig with a hard-coded <cfmail> test mail to an email address within your own Exchange system?  If that works, try changing it to an "outside world" one.

    Tried this and works fine with and address with in our Exchange system and when it is switched to an outside world address it gets stuck in the undeliverable dir like always.

    7) Anything in the CF or JRun logs?

    This is what we are getting in the Log files as the problem (but anID @ gmail.com is a valid email):

    "Error","scheduler-0","10/06/09","15:59:24",,"Invalid Addresses"

    javax.mail.SendFailedException: Invalid Addresses;
       nested exception is:
         com.sun.mail.smtp.SMTPAddressFailedException: 550 No such domain at this location (
    anID @ gmail.com)


         at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196)

         at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)

         at coldfusion.mail.MailSpooler.deliver(MailSpooler.java:832)

         at coldfusion.mail.MailSpooler.sendMail(MailSpooler.java:731)

         at coldfusion.mail.MailSpooler.deliverStandard(MailSpooler.java:1021)

         at coldfusion.mail.MailSpooler.run(MailSpooler.java:986)

         at coldfusion.scheduling.ThreadPool.run(ThreadPool.java:201)

         at coldfusion.scheduling.WorkerThread.run(WorkerThread.java:71)

    Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 No such domain at this location
    anID @ gmail.com)


         at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047)

    Thank you for your time in looking at this with us!

    JLH

    Inspiring
    October 29, 2009

    You need to tell your Exchange server that it should relay traffic from the CF server's IP address, and/or you need to authenticate your connection from CF.

    A word of warning with relay settings: make sure you only allow relaying from the CF server's IP address, and do not allow "open" relaying.  You must not allow open relaying.

    --

    Adam