SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Coldfusion cfmail sending duplicate email messages

    We are having an issue with coldfusion cfmail sending duplicate emails after a customer makes a purchase on our website. The confirmation email is sent to the customer and we are bcc'd on the email.

    We are getting 2 identical emails for every order, and based on the message source, we can see that they are being sent a few seconds apart. The server logs, however, only show 1 email being sent. Please help us figure out this problem!

    Here's the code that is being used:

    Code:
    <cfmail server="#request.mailServer#" to="#getOrderThankyou.Email#" from="#getSettings.emailAC#" subject="#request.companyAbbr# - Online Order Confirmation" bcc="#getSettings.emailAC#" type="html" spoolenable="no">

  2. #2
    SitePoint Addict
    Join Date
    Dec 2008
    Location
    Aberdeen, Scotland
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you checked the logs at the mail server end to see if anything is happening there? Or is this problem specific to this script?

  3. #3
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The server logs claim only 1 email is being sent out...we've done a lot of testing and can't find any issues anywhere else, so we're positive it's a cold fusion thing.

  4. #4
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are the logs you checked the CF logs or the mail server logs. Make sure that in the CF admin you set the cfmail log level approriate so that you actually see each and every email being sent in ColdFusion's logs files.

    If that doesn't provide any conclusion - is your script maybe executed multiple times (twice)? put a
    Code:
    <cflog>
    tag before and after your
    Code:
    <cfmail>
    tag and explicitly log all the information into a separate log file.

    I bet that either your cf code is executed twice or your mail server is doing something funny.

    Cheers
    Kai

  5. #5
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for tip. I'll try it out!

  6. #6
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If it happens every time, could it be something with the way you request the template making the cfmail call?

  7. #7
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually we just figured it out. There was a separate script on the page that was reloading the page, thus the two emails being sent. It was not a cold fusion problem after all.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •