Author: benj
Date: Wed Dec  9 14:22:03 2015
New Revision: 1655

URL: http://svn.gna.org/viewcvs/gdtc?rev=1655&view=rev
Log:
Fix sympa scnenario

Modified:
    trunk/gdtc/scripts/dtcmanager

Modified: trunk/gdtc/scripts/dtcmanager
URL: 
http://svn.gna.org/viewcvs/gdtc/trunk/gdtc/scripts/dtcmanager?rev=1655&r1=1654&r2=1655&view=diff
==============================================================================
--- trunk/gdtc/scripts/dtcmanager       (original)
+++ trunk/gdtc/scripts/dtcmanager       Wed Dec  9 14:22:03 2015
@@ -169,7 +169,11 @@
        
        foreach my $mail ( split /, */, $result -> { 'email' } )
        {  
-           print "match([sender],/$mail/) smtp -> do_it\n" if ( $mail );
+           if ( $mail =~ /[A-Za-z_0-9\+\.-]*@[A-Za-z0-9\.-]*/ )
+           {
+              $mail =~ s/ //g;
+              print "match([sender],/$mail/) smtp -> do_it\n" if ( $mail );
+           }
 
        }
     }
@@ -487,7 +491,8 @@
                                                "   AND 
DATEDIFF(now(),membership.start_date) >= 31 " .
                                                "   AND membership.start_date < 
now() " .
                                                "   AND 
DATEDIFF(membership.renewal_date,now()) <= 31 " .
-                                               "   AND membership.renewal_date 
> now();",
+                                               "   AND ( 
membership.renewal_date >= now() " .
+                                               "         OR 
DATEDIFF(now(),membership.renewal_date) <= 5 );",
                                                $type ) );
            
            if ( ! @results )


_______________________________________________
Gdtc-commits mailing list
[email protected]
https://mail.gna.org/listinfo/gdtc-commits

Reply via email to