1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

Fix for siteurl on email template. Prevent pausing on emails when bulkmail is inactive. Fix for missing mail-identifier in signup email.

This commit is contained in:
Cameron
2015-05-13 15:21:27 -07:00
parent 1b403bba6d
commit d596abc90a
4 changed files with 16 additions and 14 deletions

View File

@@ -1572,7 +1572,7 @@ class mailout_recipients_ui extends e_admin_ui
$this->mailManager = new e107MailManager;
$sql = e107::getDb();
$sql->gen("SELECT r.mail_detail_id,c.mail_title FROM #mail_recipients AS r LEFT JOIN #mail_content as c ON r.mail_detail_id = c.mail_source_id GROUP BY r.mail_detail_id");
$sql->gen("SELECT r.mail_detail_id,c.mail_title FROM `#mail_recipients` AS r LEFT JOIN `#mail_content` as c ON r.mail_detail_id = c.mail_source_id GROUP BY r.mail_detail_id");
while($row = $sql->fetch())
{

View File

@@ -125,7 +125,7 @@ $EMAIL_TEMPLATE['default']['body'] = "{BODY}<br />{MEDIA1}{MEDIA2}{MEDIA3}{MED
$EMAIL_TEMPLATE['default']['footer'] = "<br /><br /><table cellspacing='4'>
<tr><td>{SITEBUTTON: type=email&h=60}</td>
<td><h4 class='sitename'>{SITENAME=link}</h4>
<a class='siteurl' href='{SITEURL}'>{SITEURL}</a></td></tr>
{SITEURL}</td></tr>
</table>
</div>
</body>
@@ -170,7 +170,7 @@ $EMAIL_TEMPLATE['signup']['body'] = "
<br /><table cellspacing='4'>
<tr><td>{SITEBUTTON: type=email&h=60}</td>
<td><h4 class='sitename'>{SITENAME=link}</h4>
<a class='siteurl' href='{SITEURL}'>{SITEURL}</a></td></tr>
{SITEURL}</td></tr>
</table>
</div>

View File

@@ -920,7 +920,7 @@ class e107Email extends PHPMailer
*
* @return boolean|string - TRUE if success, error message if failure
*/
public function sendEmail($send_to, $to_name, $eml = '', $bulkmail = FALSE)
public function sendEmail($send_to, $to_name, $eml = '', $bulkmail = false)
{
if (count($eml))
{
@@ -931,7 +931,7 @@ class e107Email extends PHPMailer
}
if ($bulkmail && $this->localUseVerp && $this->save_bouncepath && (strpos($this->save_bouncepath,'@') !== FALSE))
if (($bulkmail == true) && $this->localUseVerp && $this->save_bouncepath && (strpos($this->save_bouncepath,'@') !== false))
{
// Format where sender is owner@origin, target is user@domain is: owner+user=domain@origin
list($our_sender,$our_domain) = explode('@', $this->save_bouncepath,2);
@@ -976,7 +976,7 @@ class e107Email extends PHPMailer
$this->TotalSent++;
if (($this->pause_amount > 0) && ($this->SendCount >= $this->pause_amount))
if (($bulkmail == true) && ($this->pause_amount > 0) && ($this->SendCount >= $this->pause_amount))
{
if ($this->SMTPKeepAlive && ($this->Mailer == 'smtp')) $this->SmtpClose();
sleep($this->pause_time);

View File

@@ -449,11 +449,11 @@ class signup
if(!$mailer->sendEmail(USEREMAIL, USERNAME, $eml, FALSE))
{
echo "<br /><br /><br /><br >&nbsp;&nbsp;>> ".LAN_SIGNUP_42; // there was a problem.
echo "<div class='alert alert-danger'>".LAN_SIGNUP_42."</div>"; // there was a problem.
}
else
{
echo "<br /><br />&nbsp;&nbsp;>> ".LAN_SIGNUP_43." [ ".USEREMAIL." ] - ".LAN_SIGNUP_45;
echo "<div class='alert alert-success'>".LAN_SIGNUP_43." [ ".USEREMAIL." ] - ".LAN_SIGNUP_45."</div>";
}
}
@@ -899,21 +899,23 @@ if (isset($_POST['register']) && intval($pref['user_reg']) === 1)
if(!vartrue($allData['data']['user_name'])) $allData['data']['user_name'] = $allData['data']['user_login'];
// prefered way to send user emails
if(!getperms('0')) // Alow logged in main-admin to test signup procedure.
{
// if(!getperms('0')) // Alow logged in main-admin to test signup procedure.
// {
$sysuser = e107::getSystemUser(false, false);
$sysuser->setData($allData['data']);
$sysuser->setId($userid);
$sysuser->setId($nid);
$check = $sysuser->email('signup', array(
'user_id' => $nid,
'user_password' => $savePassword, // for security reasons - password passed ONLY through options
));
}
else
// }
if(getperms('0'))
{
$check = true;
e107::getMessage()->addDebug(print_a($allData,true));
e107::getMessage()->addDebug("Password: <b>".$savePassword."</b>");
}
/*
$eml = render_email($allData['data']);