1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

Support TLS options on bounced email account

This commit is contained in:
e107steved
2008-01-02 20:14:13 +00:00
parent 9efed0d754
commit 0885417425
5 changed files with 45 additions and 26 deletions

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_admin/mailout.php,v $ | $Source: /cvs_backup/e107_0.8/e107_admin/mailout.php,v $
| $Revision: 1.7 $ | $Revision: 1.8 $
| $Date: 2007-12-22 14:49:21 $ | $Date: 2008-01-02 20:14:05 $
| $Author: e107steved $ | $Author: e107steved $
| |
| Work in progress - supplementary mailer plugin | Work in progress - supplementary mailer plugin
@@ -505,6 +505,7 @@ if (isset($_POST['updateprefs']) && getperms("0"))
$pref['mail_bounce_pop3'] = $_POST['mail_bounce_pop3']; $pref['mail_bounce_pop3'] = $_POST['mail_bounce_pop3'];
$pref['mail_bounce_user'] = $_POST['mail_bounce_user']; $pref['mail_bounce_user'] = $_POST['mail_bounce_user'];
$pref['mail_bounce_pass'] = $_POST['mail_bounce_pass']; $pref['mail_bounce_pass'] = $_POST['mail_bounce_pass'];
$pref['mail_bounce_type'] = $_POST['mail_bounce_type'];
$pref['mail_bounce_delete'] = $_POST['mail_bounce_delete']; $pref['mail_bounce_delete'] = $_POST['mail_bounce_delete'];
$pref['mailout_enabled'] = implode(',',$_POST['mail_mailer_enabled']); $pref['mailout_enabled'] = implode(',',$_POST['mail_mailer_enabled']);
@@ -1133,9 +1134,17 @@ $text = "
<td style='vertical-align:top' class='forumheader3'>".LAN_MAILOUT_31."</td> <td style='vertical-align:top' class='forumheader3'>".LAN_MAILOUT_31."</td>
<td style=' text-align:right' class='forumheader3'> <td style=' text-align:right' class='forumheader3'>
".LAN_MAILOUT_32.": <input class='tbox' size='40' type='text' name='mail_bounce_email' value=\"".$pref['mail_bounce_email']."\" /><br /> ".LAN_MAILOUT_32.": <input class='tbox' size='40' type='text' name='mail_bounce_email' value=\"".$pref['mail_bounce_email']."\" /><br />
".LAN_MAILOUT_33." (POP3): <input class='tbox' size='40' type='text' name='mail_bounce_pop3' value=\"".$pref['mail_bounce_pop3']."\" /><br /> ".LAN_MAILOUT_33.": <input class='tbox' size='40' type='text' name='mail_bounce_pop3' value=\"".$pref['mail_bounce_pop3']."\" /><br />
".LAN_MAILOUT_34.": <input class='tbox' size='40' type='text' name='mail_bounce_user' value=\"".$pref['mail_bounce_user']."\" /><br /> ".LAN_MAILOUT_34.": <input class='tbox' size='40' type='text' name='mail_bounce_user' value=\"".$pref['mail_bounce_user']."\" /><br />
".LAN_MAILOUT_35.": <input class='tbox' size='40' type='text' name='mail_bounce_pass' value=\"".$pref['mail_bounce_pass']."\" /><br />"; ".LAN_MAILOUT_35.": <input class='tbox' size='40' type='text' name='mail_bounce_pass' value=\"".$pref['mail_bounce_pass']."\" /><br />
".LAN_MAILOUT_120.": <select class='tbox' name='mail_bounce_type'>\n
<option value=''>&nbsp;</option>\n
<option value='pop3'".(($pref['mail_bounce_type']=='pop3') ? " selected='selected'" : "").">".LAN_MAILOUT_121."</option>\n
<option value='pop3/notls'".(($pref['mail_bounce_type']=='pop3/notls') ? " selected='selected'" : "").">".LAN_MAILOUT_122."</option>\n
<option value='pop3/tls'".(($pref['mail_bounce_type']=='pop3/tls') ? " selected='selected'" : "").">".LAN_MAILOUT_123."</option>\n
<option value='imap'".(($pref['mail_bounce_type']=='imap') ? " selected='selected'" : "").">".LAN_MAILOUT_124."</option>\n
</select><br />\n
";
$check = ($pref['mail_bounce_delete']==1) ? " checked='checked'" : ""; $check = ($pref['mail_bounce_delete']==1) ? " checked='checked'" : "";
$text .= LAN_MAILOUT_36.": <input type='checkbox' name='mail_bounce_delete' value='1' {$check} /> $text .= LAN_MAILOUT_36.": <input type='checkbox' name='mail_bounce_delete' value='1' {$check} />

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_admin/users.php,v $ | $Source: /cvs_backup/e107_0.8/e107_admin/users.php,v $
| $Revision: 1.11 $ | $Revision: 1.12 $
| $Date: 2008-01-01 18:18:05 $ | $Date: 2008-01-02 20:14:05 $
| $Author: e107steved $ | $Author: e107steved $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -1293,7 +1293,7 @@ class users
// echo "Check bounces. Action: {$bounce_act}; Entries: {$bounce_arr}<br />"; // echo "Check bounces. Action: {$bounce_act}; Entries: {$bounce_arr}<br />";
$obj= new receiveMail($pref['mail_bounce_user'],$pref['mail_bounce_pass'],$pref['mail_bounce_email'],$pref['mail_bounce_pop3'],'pop3','110'); $obj= new receiveMail($pref['mail_bounce_user'],$pref['mail_bounce_pass'],$pref['mail_bounce_email'],$pref['mail_bounce_pop3'],varset($pref['mail_bounce_type'],'pop3'));
$del_count = 0; $del_count = 0;
if ($bounce_act !='first_check') if ($bounce_act !='first_check')
{ // Must do some deleting { // Must do some deleting

View File

@@ -1,17 +1,17 @@
<?php <?php
if (!defined('e107_INIT')) { exit; } if (!defined('e107_INIT')) { exit; }
// $Id: pop3_class.php,v 1.1.1.1 2006-12-02 04:33:56 mcfly_e107 Exp $ // $Id: pop3_class.php,v 1.2 2008-01-02 20:14:05 e107steved Exp $
// Main ReciveMail Class File - Version 1.0 (01-03-2006) // Main ReciveMail Class File - Version 1.0 (01-03-2006)
/* /*
* File: recivemail.class.php * File: recivemail.class.php
* Description: Reciving mail With Attechment * Description: Receiving mail With Attachment
* Version: 1.0 * Version: 1.0
* Created: 01-03-2006 * Created: 01-03-2006
* Author: Mitul Koradia * Author: Mitul Koradia
* Email: mitulkoradia@gmail.com * Email: mitulkoradia@gmail.com
* Cell : +91 9879697592 * Cell : +91 9879697592
Modified by CaMer0n (www.e107coders.org) Modified by CaMer0n (www.e107coders.org) and steved
*/ */
class receiveMail class receiveMail
@@ -24,7 +24,7 @@ class receiveMail
var $email=''; var $email='';
function receiveMail($username,$password,$EmailAddress,$mailserver='localhost',$servertype='pop',$port='110') //Constructure function receiveMail($username,$password,$EmailAddress,$mailserver='localhost',$servertype='pop3',$port='110') //Constructor
{ {
if($servertype=='imap') if($servertype=='imap')
{ {
@@ -33,7 +33,9 @@ class receiveMail
} }
else else
{ {
$strConnect='{'.$mailserver.':'.$port. '/pop3}INBOX'; if($port=='') $port='110';
if ($servertype == '') $servertype = 'pop3';
$strConnect='{'.$mailserver.':'.$port. '/'.$servertype.'}INBOX';
} }
$this->server = $strConnect; $this->server = $strConnect;
$this->username = $username; $this->username = $username;

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/help/mailout.php,v $ | $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/help/mailout.php,v $
| $Revision: 1.2 $ | $Revision: 1.3 $
| $Date: 2007-12-22 14:49:34 $ | $Date: 2008-01-02 20:14:13 $
| $Author: e107steved $ | $Author: e107steved $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -44,12 +44,19 @@ if (e_QUERY) list($action,$junk) = explode('.',e_QUERY); else $action = 'makemai
$text .= 'Any attachment is selected from the list of valid downloads.'; $text .= 'Any attachment is selected from the list of valid downloads.';
break; break;
case 'prefs' : case 'prefs' :
$text = 'Configure mailshot options.<br />'; $text = '<b>Configure mailshot options.</b><br />
$text .= 'A test email is sent using the current method and settings.<br />'; A test email is sent using the current method and settings.<br /><br />';
$text .= 'Use SMTP to send mail if possible. The settings will depend on your host\'s mail server.<br />'; $text .= '<b>Emailing Method</b><br />
$text .= 'You can specifiy a POP3 account to receive the return response when an email is undeliverable.<br />'; Use SMTP to send mail if possible. The settings will depend on your host\'s mail server.<br /><br />';
$text .= 'If you have additional mail-related plugins, you can select which of them may contribute email addresses to the list.<br />'; $text .= '<b>Bounced Emails</b><br />
$text .= 'The logging option creates a text file in the stats plugin\'s log directory. This must be deleted periodically.'; You can specify a POP3 account to receive the return response when an email is undeliverable. Normally this will be a standard
POP3 account; use the TLS-related options only if specifically required by your host<br /><br />';
$text .= '<b>Email Address Sources</b><br />
If you have additional mail-related plugins, you can select which of them may contribute email addresses to the list.<br /><br />';
$text .= '<b>Logging</b><br />
The logging option creates a text file in the stats plugin\'s log directory. This must be deleted periodically. The \'logging
only\' options allow you to see exactly who would receive emails if actually sent. The \'with errors\' option fails every
7th email, primarily for testing';
break; break;
default : default :
$text = 'Undocumented option'; $text = 'Undocumented option';

View File

@@ -4,8 +4,8 @@
| e107 website system - Language File. | e107 website system - Language File.
| |
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_mailout.php,v $ | $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_mailout.php,v $
| $Revision: 1.2 $ | $Revision: 1.3 $
| $Date: 2007-12-22 14:49:34 $ | $Date: 2008-01-02 20:14:13 $
| $Author: e107steved $ | $Author: e107steved $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -128,10 +128,11 @@ define('LAN_MAILOUT_116','If unsure, leave as php');
define('LAN_MAILOUT_117','complete'); define('LAN_MAILOUT_117','complete');
define('LAN_MAILOUT_118','Click on \'proceed\' to start sending emails. Click on \'cancel\' to stop the run. Once complete, select another page. Unsent emails cal be viewed through the \'Mailshot status\' screen'); define('LAN_MAILOUT_118','Click on \'proceed\' to start sending emails. Click on \'cancel\' to stop the run. Once complete, select another page. Unsent emails cal be viewed through the \'Mailshot status\' screen');
define('LAN_MAILOUT_119','Logging only, with errors'); define('LAN_MAILOUT_119','Logging only, with errors');
define('LAN_MAILOUT_120',''); define('LAN_MAILOUT_120','Account type');
define('LAN_MAILOUT_121','Standard POP3');
define('LAN_MAILOUT_122','POP3, TLS disabled');
define('LAN_MAILOUT_123','POP3 with TLS');
define('LAN_MAILOUT_124','IMAP');