12 Replies Latest reply on Feb 25, 2010 6:45 AM by Flashdakota

    Script to detect hard and soft mail bounces

    Flashdakota

      Hi

       

      I have a client that sends out mail to 25000+ people per day.

      HE gets a large amount of bounces.

       

      I need to delete hard bounces and capture soft bounces in a table.

       

      I have got so far as to check the body of all bounce backs for all email addresses within the body.

       

      How do i know detect if it is a hard or a soft bounce.

       

      Please can someone assist me as my server is taking sever strain!

       

      Best regards

      Delon

       

       

       

      <!-------------HERE IS MY CODE SO FAR------>

       

      <cfpop
        server = "x"
        username = "failto@x.co.za"
        password = "x"
        action="getall"
        name = "somequery" timeout="90000">
       
        Failed mail:<Br><Br>
        <cfoutput query="somequery">
        #Currentrow#.  From: #From# -- Subject: #Subject#<Br>
       
        <CFSET text = "#body#">

       

      <CFSET emaillist = "">
      <CFSET start = 1>
      <CFSET regex = "[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.(([a-z]{2,3})|(aero|coop|info|mus eum|name))">

       

      <CFLOOP condition="start lt LEN(text)">
            <CFSET findemail = REFindNoCase(regex,text,start,"TRUE")>
            <CFIF findemail.len[1] AND findemail.pos[1]>
                  <CFSET emaillist = LISTAPPEND(emaillist,MID(text,findemail.pos[1],findemail.len[1]))>
                  <CFSET start = findemail.pos[1] + findemail.len[1]>
            <CFELSE>
                  <CFBREAK>
            </cfif>
      </cfloop>
      <font face="Arial, Helvetica, sans-serif" size="1" color="##666666">#paragraphformat(body)#</font>
      <font face="Arial, Helvetica, sans-serif" size="1" color="##FF0000">Emails Found: #emaillist#<br><Br><Br></font></cfoutput>