//line 352
$hosts_count = sizeof($smtparray);
$host_divide = 60/$hosts_count;
//line 641
$date_s = date("s");
$host_nr = floor ($date_s/$host_divide);
$smtphost = $smtparray[$host_nr];
//line 647
//old:
$success = sendEmail($messageid,$useremail,$userhash,$htmlpref,$rssitems);
//new:
$success = sendEmail($smtphost,$messageid,$useremail,$userhash,$htmlpref,$rssitems);
352 while ($message = Sql_fetch_array($messages)) {
353 $failed_sent = 0;
354 $throttlecount = 0;
629 if (!$throttled) {
630 if (VERBOSE)
631 output($GLOBALS['I18N']->get('Sending').' '. $messageid.' '.$GLOBALS['I18N']->get('to').' '. $useremail);
632 $timer = new timer();
633 $success = sendEmail($messageid,$useremail,$userhash,$htmlpref,$rssitems);
634 if (VERBOSE) {
635 output($GLOBALS['I18N']->get('It took').' '.$timer->elapsed(1).' '.$GLOBALS['I18N']->get('seconds to send'));
636 }
637 } else {
638 $throttlecount++;
639 }
640 } else {
641 $success = sendEmailTest($messageid,$useremail);
642 }
643 if ($success) {
644 if (USE_DOMAIN_THROTTLE) {
645 list($mailbox,$domainname) = explode('@',$useremail);
646 if ($domainthrottle[$domainname]['interval'] != $interval) {
647 $domainthrottle[$domainname]['interval'] = $interval;
648 $domainthrottle[$domainname]['sent']=0;
$success = sendEmail($messageid,$useremail,$userhash,$htmlpref,$rssitems);
include_once ('smtphost.inc.php');
$hosts_count = sizeof($smtparray);
$host_divide = 60/$hosts_count;
while ($message = Sql_fetch_array($messages)) {
$this->Username = $GLOBALS['phpmailer_smtpuser'];
$this->Password = $GLOBALS['phpmailer_smtppassword'];
lygie wrote:
> After adding all this code I am still confused as to where I tell it the server SMTP password and user, for each of the servers?
the most easiest thing would be to configure the SMTP-Host, that they allow to relay the E-Mails from phplist without a password.
That how i did it for my newsletter setups.
If this is not possible, you would have to modify
- Code: Select all
$this->Username = $GLOBALS['phpmailer_smtpuser'];
$this->Password = $GLOBALS['phpmailer_smtppassword'];
in class.phplistmailer.php
Best would be, to put it in the configuration array and take it trough all funktion-calls.
I will try to get some ready-to-use code here. I guess it will take me about one day.
$smtparray = array("server1.tld", "server2.tld", "server3.tld");
$smtpuserarray = array("server1username","server2username","server3username");
$smtppassarray = array("server1password","server2password","server3password");
if(!is_array($smtparray) && !is_array($smtpuserarray) && !is_array($smtppassarray)){
$smtparray[]=PHPMAILERHOST;
}
#if you want do sent email over more than one smtp-Server, uncomment and fill following lines
$smtparray = array(
"0" => array("hostname"=>"server1.tld","smtp_login"=>"username","smtp_passwd"=>"passwd"),
"1" => array("hostname"=>"server2.tld","smtp_login"=>"username","smtp_passwd"=>"passwd"),
"2" => array("hostname"=>"server3.tld","smtp_login"=>"username","smtp_passwd"=>"passwd"),
);
$this->Host = $mailhost["hostname"];
if($mailhost["smtp_login"]!=''){
$this->Username = $mailhost["smtp_login"];
}
if($mailhost["smtp_passwd"]!=''){
$this->Password = $mailhost["smtp_passwd"];
}
The next item would be to set the from and reply in the header to match the settings.
Users browsing this forum: No registered users and 1 guest