Skip to main content
May 17, 2011
Question

CFMail Behavior in CF9 -- Invalid Email Accounts

  • May 17, 2011
  • 1 reply
  • 1951 views

Hello,

We recently switched from ColdFusion 7 to ColdFusion 9. The environment is as follows:

ColdFusion 9 Standard version 9.0.1,274733

Windows Server 2008 R2

Apache 2.2

We send outgoing e-mails using our local campus SMTP server. In the past, with CF7, when an account did not exist on the smtp server the mail would go into the Undeliverable folder. This worked out great, because we could scan this folder and find e-mails that were not delivered due to expired e-mail addresses.

In CF9, this behavior has changed. The mail is now "sent successfully" according to the logs, and not moved into the undeliverable folder. The problem with this is that the mail has NOT been sent successfully! The SMTP server rejects the message at the sending stage, and CF9 just ignores this and says the mail was sent successfully. Since the SMTP server rejects it, I do not receive an "undelivered email" message from the server.

We skipped CF8, so I don't know if it behaves this way or not.

Here is a copy of the debug log for an smtp session, illustrating the problem:

MAIL FROM:<me@school.edu>
250 2.1.0 <me@school.edu>... Sender ok
RCPT TO:<thisisnotarealemailaddress@school.edu>
550 5.1.1 <thisisnotarealemailaddress@school.edu>... User unknown
DEBUG SMTP: Invalid Addresses
DEBUG SMTP:   thisisnotarealemailaddress@ucdavis.edu
DEBUG SMTP: Sending failed because of invalid destination addresses
RSET
250 2.0.0 Reset state
javax.mail.SendFailedException: Invalid Addresses;
  nested exception is:
    com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 <thisisnotarealemailaddress@school.edu>... User unknown

    at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1446)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:736)
    at coldfusion.mail.MailSpooler.deliver(MailSpooler.java:1006)
    at coldfusion.mail.MailSpooler.sendMail(MailSpooler.java:905)
    at coldfusion.mail.MailSpooler.deliverStandard(MailSpooler.java:1310)
    at coldfusion.mail.MailSpooler.run(MailSpooler.java:1275)
    at coldfusion.scheduling.ThreadPool.run(ThreadPool.java:201)
    at coldfusion.scheduling.WorkerThread.run(WorkerThread.java:71)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 <thisisnotarealemailaddress@school.edu>... User unknown

    at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1297)
    ... 7 more
QUIT
221 2.0.0 smtp2.school.edu closing connection
05/17 08:59:00 Information [scheduler-2] - Mail: 'This is a test.' From:'me@school.edu' To:'thisisnotarealemailaddress@school.edu' was successfully sent using smtp.school.edu

Any ideas on how to correct this behavior?

Thanks!

    This topic has been closed for replies.

    1 reply

    September 23, 2011

    We recently did the same jump from CF MX7 to 9.  Our logs are filling with similar errors when we try using the mail tag.  Has anybody found a solution to this?

    We've tried configurations via the Administrator console as well as overriding every attribute on the mail tag.  Nothing seems to work...

    July 24, 2012

    Try adding the following to your JVM Arguments in CF Admin.  It fixed the problem for me:

    - Dmail.smtp.sendpartial=true