Changeset 2113611
- Timestamp:
- 06/27/2019 12:45:51 PM (7 years ago)
- Location:
- bounce-handler-mailpoet
- Files:
-
- 5 edited
- 8 copied
-
tags/1.3.14 (copied) (copied from bounce-handler-mailpoet/trunk)
-
tags/1.3.14/bounce-handler-mailpoet.php (copied) (copied from bounce-handler-mailpoet/trunk/bounce-handler-mailpoet.php)
-
tags/1.3.14/changelog.txt (copied) (copied from bounce-handler-mailpoet/trunk/changelog.txt)
-
tags/1.3.14/includes/class-mailpoet-bounce-detect.php (copied) (copied from bounce-handler-mailpoet/trunk/includes/class-mailpoet-bounce-detect.php)
-
tags/1.3.14/includes/class-mailpoet-bounce-handler.php (copied) (copied from bounce-handler-mailpoet/trunk/includes/class-mailpoet-bounce-handler.php)
-
tags/1.3.14/languages/bounce-handler-mailpoet-da_DK.mo (copied) (copied from bounce-handler-mailpoet/trunk/languages/bounce-handler-mailpoet-da_DK.mo)
-
tags/1.3.14/languages/bounce-handler-mailpoet-da_DK.po (copied) (copied from bounce-handler-mailpoet/trunk/languages/bounce-handler-mailpoet-da_DK.po)
-
tags/1.3.14/readme.txt (copied) (copied from bounce-handler-mailpoet/trunk/readme.txt)
-
trunk/bounce-handler-mailpoet.php (modified) (1 diff)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/includes/class-mailpoet-bounce-detect.php (modified) (1 diff)
-
trunk/includes/class-mailpoet-bounce-handler.php (modified) (9 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
bounce-handler-mailpoet/trunk/bounce-handler-mailpoet.php
r2112545 r2113611 6 6 * Plugin Name: Bounce Handler Mailpoet 7 7 * Description: Bounce Handler Mailpoet is an add-on for MailPoet 3 to handle bounce emails easily, when using your own SMTP server. 8 * Version: 1.3.1 48 * Version: 1.3.15 9 9 * Author: Tikweb 10 10 * Author URI: http://www.tikweb.dk/ -
bounce-handler-mailpoet/trunk/changelog.txt
r2112545 r2113611 1 1 == Changelog == 2 3 = 1.3.15 - 2019-06-27 = 4 * Added: Message expired bounce emails will now consider as mailbox not available 2 5 3 6 = 1.3.14 - 2019-06-25 = -
bounce-handler-mailpoet/trunk/includes/class-mailpoet-bounce-detect.php
r2112545 r2113611 674 674 "name" => __('Mailbox not available', 'bounce-handler-mailpoet'), 675 675 "title" => __('When mailbox is not available', 'bounce-handler-mailpoet'), 676 "regex" => ' (Invalid|no such|unknown|bad|des?activated|undelivered|inactive|unrouteable|delivery|mail ID|failed to|may not|no known user|email account) *(mail|destination|recipient|user|address|person|failure|has failed|does not exist|deliver to|exist|with this email|is closed)|RecipNotFound|status(-code)? *(:|=)? *5\.(1\.[1-6]|0\.0|4\.[0123467])|(user|mailbox|address|recipients?|host|account|domain) *(is|has been)? *(error|disabled|failed|unknown|unavailable|not *(found|available)|.{1,30}inactiv)|recipient *address *rejected|does *not *like *recipient|no *mailbox *here|user does.?n.t have.{0,20}account'676 "regex" => 'expired|(Invalid|no such|unknown|bad|des?activated|undelivered|inactive|unrouteable|delivery|mail ID|failed to|may not|no known user|email account) *(mail|destination|recipient|user|address|person|failure|has failed|does not exist|deliver to|exist|with this email|is closed)|RecipNotFound|status(-code)? *(:|=)? *5\.(1\.[1-6]|0\.0|4\.[0123467])|(user|mailbox|address|recipients?|host|account|domain) *(is|has been)? *(error|disabled|failed|unknown|unavailable|not *(found|available)|.{1,30}inactiv)|recipient *address *rejected|does *not *like *recipient|no *mailbox *here|user does.?n.t have.{0,20}account' 677 677 ], 678 678 [ -
bounce-handler-mailpoet/trunk/includes/class-mailpoet-bounce-handler.php
r2112545 r2113611 404 404 <input id="bounce[spammer_forward]" size="30" type="text" name="bounce[spammer_forward]" value="<?php $this->show_value($bounce['spammer_forward']); ?>"> 405 405 </li> 406 407 408 409 410 411 406 <li> 412 <label for="bounce[weird_forward]"><?php _e("When the bounce is weird and we're not sure what to do", 'bounce-handler-mailpoet'); ?>: </label> 413 414 <?php $wfa_cond = isset($bounce['wfa_cond']) ? $bounce['wfa_cond'] : ''; ?> 415 <select name="bounce[wfa_cond]" id="bounce[wfa_cond]"> 416 <option value='forward_email' <?php selected($wfa_cond, 'forward_email'); ?> ><?php _e('Forward to', 'bounce-handler-mailpoet'); ?></option> 417 <option value="do_nothing" <?php selected($wfa_cond, ''); ?> ><?php _e('Do nothing', 'bounce-handler-mailpoet'); ?></option> 418 <option value="delete" <?php selected($wfa_cond, 'delete'); ?> ><?php _e('Delete the user', 'bounce-handler-mailpoet'); ?></option> 419 <option value="bounced" <?php selected($wfa_cond, 'bounced'); ?> ><?php _e('Change status to \'Bounced\'', 'bounce-handler-mailpoet'); ?></option> 420 <option value="unsub" <?php selected( $wfa_cond, 'unsub' ); ?>>Unsubscribe The User</option> 421 <option value="wfa_addOrRemove" <?php selected( $wfa_cond, 'wfa_addOrRemove' ); ?>><?php _e('Disregard current list','bounce-handler-mailpoet'); ?></option> 422 </select> 423 <?php $wfa_add_remove = isset($bounce['wfa_add_remove']) ? $bounce['wfa_add_remove'] : 'do_nothing'; ?> 424 <span class="hidden" id="wfa-unsub-wraper"> 425 <?php _e('and','bounce-handler-mailpoet');?> 426 <select name="bounce[wfa_add_remove]" id="bounce[wfa_add_remove]"> 427 <option value="add" <?php selected( $wfa_add_remove,'add' ); ?>><?php _e('Add','bounce-handler-mailpoet');?></option> 428 <option value="remove" <?php selected( $wfa_add_remove,'remove' ); ?>><?php _e('Remove','bounce-handler-mailpoet');?></option> 429 <option value="do_nothing" <?php selected( $wfa_add_remove,'do_nothing' ); ?>><?php _e('Do nothing more','bounce-handler-mailpoet');?></option> 430 </select> 431 <span id="wfa-hide-on-nothing"> 432 <?php $wfa_list = isset($bounce['wfa_list']) ? $bounce['wfa_list'] : ''; ?> 433 <?php _e('him for the list','bounce-handler-mailpoet');?> 434 <select name="bounce[wfa_list]" id="bounce[wfa_list]"> 435 <?php 436 $sagments = Segment::getPublic()->findArray(); 437 if(!empty($sagments)): foreach($sagments as $sagment): 438 ?> 439 <option value="<?php echo $sagment['id'];?>" <?php selected( $wfa_list,$sagment['id'] ); ?>><?php echo $sagment['name'];?></option> 440 <?php endforeach;?> 441 <?php else : ?> 442 <option value="1"><?php _e('No List Found','bounce-handler-mailpoet');?></option> 443 <?php endif; ?> 444 </select> 445 <?php $wfa_status = isset($bounce['wfa_status']) ? $bounce['wfa_status'] : ''; ?> 446 <?php _e('as','bounce-handler-mailpoet');?> 447 <select name="bounce[wfa_status]" id="bounce[wfa_status]"> 448 <option value="subs" <?php selected( $wfa_status,'subs' );?>><?php _e('Subscriber','bounce-handler-mailpoet');?></option> 449 <option value="bounced" <?php selected( $wfa_status,'bounced' );?>><?php _e('Bounced','bounce-handler-mailpoet');?></option> 450 <option value="unconfirmed" <?php selected( $wfa_status,'unconfirmed' );?>><?php _e('Unconfirmed','bounce-handler-mailpoet');?></option> 451 <option value="unsubs" <?php selected( $wfa_status,'unsubs' );?>><?php _e('Unsubscriber','bounce-handler-mailpoet');?></option> 452 </select> 453 </span> 454 </span> 455 456 457 <span id="bouncefwa"><input id="bounce[weird_forward]" required size="30" type="text" class="" name="bounce[weird_forward]" value="<?php $this->show_value($bounce['weird_forward']); ?>"></span> 407 <label for="bounce[weird_forward]"><?php _e("When the bounce is weird and we're not sure what to do, forward to", 'bounce-handler-mailpoet'); ?>: </label> 408 <input id="bounce[weird_forward]" size="30" type="text" class="" name="bounce[weird_forward]" value="<?php $this->show_value($bounce['weird_forward']); ?>"> 458 409 </li> 459 410 </ol> … … 625 576 626 577 //Valide weird not sure Email 627 //if(!is_email($bounce['weird_forward'])){628 //$error[] = __("Please set a valid email address for forward rules when the bounce is weird and we're not sure what to do.","bounce-handler-mailpoet");629 //$error[] = 'weird_forward';630 //}578 if(!is_email($bounce['weird_forward'])){ 579 $error[] = __("Please set a valid email address for forward rules when the bounce is weird and we're not sure what to do.","bounce-handler-mailpoet"); 580 $error[] = 'weird_forward'; 581 } 631 582 632 583 //Email validate if … … 675 626 } 676 627 } 677 678 679 if ( ($bounce['wfa_cond'] == 'wfa_addOrRemove' || $bounce['wfa_cond'] == 'unsub') && $bounce['wfa_add_remove'] !='do_nothing' ){680 $bounce['weird_forward'] = array(681 'cond' => $bounce['wfa_cond'],682 'add_remove' => $bounce['wfa_add_remove'],683 'list' => $bounce['wfa_list'],684 'status' => $bounce['wfa_status'],685 );686 } else {687 //execute below if statement only if user choose other option than forward email688 if ('forward_email' != $bounce['wfa_cond']) {689 $bounce['weird_forward'] = $bounce['wfa_cond'];690 }691 if ( $bounce['wfa_cond'] != 'wfa_addOrRemove' ){692 foreach ($nested_cond as $key) {693 unset($bounce['wfa_'.$key]);694 }695 }696 }697 698 699 700 628 701 629 $bounce['last_updated'] = time(); … … 803 731 $(function() { 804 732 805 showHide_wfaForm();806 733 /** 807 734 * Active settings tab … … 843 770 }); 844 771 845 var wfa_sel = $('select[name="bounce[wfa_cond]"]');846 $(wfa_sel).on('change',function(){847 showHide_UnsubWraper();848 showHide_wfaForm();849 });850 851 852 853 772 var mna_dn = $('select[name="bounce[mna_add_remove]"]'); 854 773 var mf_dn = $('select[name="bounce[mf_add_remove]"]'); 855 var wfa_dn = $('select[name="bounce[wfa_add_remove]"]');856 774 857 775 $(mf_dn).on('change',function(){ … … 863 781 }); 864 782 865 $(wfa_dn).on('change',function(){866 showHide_DnWraper();867 });868 869 870 783 function showHide_DnWraper(){ 871 784 872 var mf_dn = $('select[name="bounce[mf_add_remove]"]'); 785 var mna_dn = $('select[name="bounce[mna_add_remove]"]'); 786 var mf_dn = $('select[name="bounce[mf_add_remove]"]'); 787 873 788 if ( mf_dn.find(':selected').val() == 'do_nothing' ){ 874 789 $('span#mf-hide-on-nothing').addClass('hidden'); … … 877 792 } 878 793 879 880 var mna_dn = $('select[name="bounce[mna_add_remove]"]');881 794 if ( mna_dn.find(':selected').val() == 'do_nothing' ){ 882 795 $('span#mna-hide-on-nothing').addClass('hidden'); … … 885 798 } 886 799 887 888 var wfa_dn = $('select[name="bounce[wfa_add_remove]"]');889 if ( wfa_dn.find(':selected').val() == 'do_nothing' ){890 $('span#wfa-hide-on-nothing').addClass('hidden');891 } else {892 $('span#wfa-hide-on-nothing').removeClass('hidden');893 }894 800 } 895 896 //hehe897 // if ($('select[name="bounce[mf_cond]"]').find(':selected').val() != 'forward_email') {898 // $('span#mf-unsub-wraper').addClass('hidden');899 // }900 801 901 802 function showHide_UnsubWraper(){ … … 919 820 } 920 821 921 922 var wfa_sel = $('select[name="bounce[wfa_cond]"]');923 924 if ( wfa_sel.find(':selected').val() == 'unsub' ||925 wfa_sel.find(':selected').val() == 'wfa_addOrRemove' ){926 $('span#wfa-unsub-wraper').removeClass('hidden');927 }928 else {929 $('span#wfa-unsub-wraper').addClass('hidden');930 }931 932 }933 934 function showHide_wfaForm() {935 var wfa_sel = $('select[name="bounce[wfa_cond]"]');936 937 if (wfa_sel.find(':selected').val() != 'forward_email') {938 $('span#bouncefwa').addClass('hidden');939 $('#bouncefwa input[name="bounce[weird_forward]"]').removeAttr('required')940 $('#bouncefwa input[name="bounce[weird_forward]"]').removeAttr('value')941 }942 else {943 $('span#bouncefwa').removeClass('hidden');944 $('#bouncefwa input[name="bounce[weird_forward]"]').attr('required', 'required')945 }946 822 } 947 823 -
bounce-handler-mailpoet/trunk/readme.txt
r2112545 r2113611 6 6 Tested up to: 5.2.2 7 7 Requires PHP: 5.6.0 8 Stable tag: 1.3.1 48 Stable tag: 1.3.15 9 9 10 10 Automatic mail bounce handling for MailPoet 3 to handle bounce emails easily when using your own SMTP server.
Note: See TracChangeset
for help on using the changeset viewer.