Search code examples
coldfusioncfmail

<cfmail> delay between entering and email and when the email is sent


I have a huge delay when sending email (1-2 hours) using cfmail.

Is there a setting in the Coldfusion Admin where this can be adjusted, or does the speed of the email delivery depend on many factors?

Any tips would be greatly appreciated.


Solution

  • Usually, CFMAIL creates a text file in the Mail/Spool directory in your CFroot. Then another process picks up these "spooled" files and attempts to send them in the background.

    The timing of this secondary process is controlled from the Administrator on the "Mail" page.

    Spool Interval (seconds)

    Check that setting first.

    Note:

    • if CF is set to not spool the mail, it will attempt to send mail immediately
    • once CF hands off the message to the SMTP server it's out of CF's control; you'll need to dig into your mailserver logs (and those upstream)
    • checking "Log all mail messages sent by ColdFusion" will be helpful to troubleshoot when email messages are actually being sent