"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/admin/class.phplistmailer.php" between
phplist-3.4.9.tgz and phplist-3.5.0.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

class.phplistmailer.php  (phplist-3.4.9.tgz):class.phplistmailer.php  (phplist-3.5.0.tgz)
skipping to change at line 33 skipping to change at line 33
'bmp' => 'image/bmp', 'bmp' => 'image/bmp',
'png' => 'image/png', 'png' => 'image/png',
'tif' => 'image/tiff', 'tif' => 'image/tiff',
'tiff' => 'image/tiff', 'tiff' => 'image/tiff',
'swf' => 'application/x-shockwave-flash', 'swf' => 'application/x-shockwave-flash',
); );
public function __construct($messageid, $email, $inBlast = true, $exceptions = false) public function __construct($messageid, $email, $inBlast = true, $exceptions = false)
{ {
parent::__construct($exceptions); parent::__construct($exceptions);
$this->addCustomHeader('X-phpList-version: '.VERSION); $this->addCustomHeader('X-phpList-version', VERSION);
$this->addCustomHeader("X-MessageID: $messageid"); $this->addCustomHeader('X-MessageID', $messageid);
$this->addCustomHeader("X-ListMember: $email"); $this->addCustomHeader('X-ListMember', $email);
if (GOOGLE_SENDERID != '') { if (GOOGLE_SENDERID != '') {
$this->addCustomHeader("Feedback-ID: $messageid:".GOOGLE_SENDERID); $this->addCustomHeader('Feedback-ID', "$messageid:".GOOGLE_SENDERID) ;
} }
//# amazon SES doesn't like this //# amazon SES doesn't like this
/* /*
* http://mantis.phplist.com/view.php?id=15562 * http://mantis.phplist.com/view.php?id=15562
* Interesting, https://mantis.phplist.com/view.php?id=16688 * Interesting, https://mantis.phplist.com/view.php?id=16688
* says Gmail wants it. Everyone's confused. * says Gmail wants it. Everyone's confused.
* *
* Also, are we "Precedence: bulk, or Precedence: list" * Also, are we "Precedence: bulk, or Precedence: list"
* *
skipping to change at line 59 skipping to change at line 59
* but what would be our default? * but what would be our default?
* *
if (!USE_AMAZONSES) { if (!USE_AMAZONSES) {
# $this->addCustomHeader("Precedence: bulk"); # $this->addCustomHeader("Precedence: bulk");
} }
* *
* ok, decided: * ok, decided:
*/ */
if (!USE_AMAZONSES && USE_PRECEDENCE_HEADER) { if (!USE_AMAZONSES && USE_PRECEDENCE_HEADER) {
$this->addCustomHeader('Precedence: bulk'); $this->addCustomHeader('Precedence', 'bulk');
} }
$newwrap = getConfig('wordwrap'); $newwrap = getConfig('wordwrap');
if ($newwrap) { if ($newwrap) {
$this->WordWrap = $newwrap; $this->WordWrap = $newwrap;
} }
if (defined('SMTP_TIMEOUT')) { if (defined('SMTP_TIMEOUT')) {
$this->Timeout = sprintf('%d', SMTP_TIMEOUT); $this->Timeout = sprintf('%d', SMTP_TIMEOUT);
} }
skipping to change at line 236 skipping to change at line 236
public function append_text($text) public function append_text($text)
{ {
if ($this->AltBody) { if ($this->AltBody) {
$this->AltBody .= html_entity_decode($text, ENT_QUOTES, 'UTF-8'); // $text; $this->AltBody .= html_entity_decode($text, ENT_QUOTES, 'UTF-8'); // $text;
} else { } else {
$this->Body .= html_entity_decode($text."\n", ENT_QUOTES, 'UTF-8'); //$text; $this->Body .= html_entity_decode($text."\n", ENT_QUOTES, 'UTF-8'); //$text;
} }
} }
public function build_message()
{
}
public function CreateHeader() public function CreateHeader()
{ {
$parentheader = parent::CreateHeader(); $parentheader = parent::CreateHeader();
if (!empty($this->timeStamp)) { if (!empty($this->timeStamp)) {
$header = 'Received: '.$this->timeStamp.$this->lineEnding.$parenthea der; $header = 'Received: '.$this->timeStamp.$this->lineEnding.$parenthea der;
} else { } else {
$header = $parentheader; $header = $parentheader;
} }
return $header; return $header;
} }
public function CreateBody()
{
$body = parent::CreateBody();
/*
if ($this->ContentType != 'text/plain') {
foreach ($GLOBALS['plugins'] as $plugin) {
$plreturn = $plugin->mimeWrap($this->messageid,$body,$this->h
eader,$this->ContentTypeHeader,$this->destinationemail);
if (is_array($plreturn) && sizeof($plreturn) == 3) {
$this->header = $plreturn[0];
$body = $plreturn[1];
$this->ContentTypeHeader = $plreturn[2];
}
}
}
*/
return $body;
}
public function compatSend( public function compatSend(
$to_name, $to_name,
$to_addr, $to_addr,
$from_name, $from_name,
$from_addr, $from_addr,
$subject = '', $subject = ''
$headers = '',
$envelope = ''
) { ) {
if (!empty($from_addr) && method_exists($this, 'SetFrom')) { if (!empty($from_addr) && method_exists($this, 'SetFrom')) {
$this->SetFrom($from_addr, $from_name); $this->SetFrom($from_addr, $from_name);
} else { } else {
$this->From = $from_addr; $this->From = $from_addr;
$this->FromName = $from_name; $this->FromName = $from_name;
} }
if (!empty($GLOBALS['developer_email'])) { if (!empty($GLOBALS['developer_email'])) {
// make sure we are not sending out emails to real users // make sure we are not sending out emails to real users
// when developing // when developing
skipping to change at line 304 skipping to change at line 280
} }
$this->Subject = $subject; $this->Subject = $subject;
if ($this->Body) { if ($this->Body) {
//# allow plugins to add header lines //# allow plugins to add header lines
foreach ($GLOBALS['plugins'] as $pluginname => $plugin) { foreach ($GLOBALS['plugins'] as $pluginname => $plugin) {
// print "Checking Destination for ".$plugin->name."<br/>"; // print "Checking Destination for ".$plugin->name."<br/>";
$pluginHeaders = $plugin->messageHeaders($this); $pluginHeaders = $plugin->messageHeaders($this);
if ($pluginHeaders && count($pluginHeaders)) { if ($pluginHeaders && count($pluginHeaders)) {
foreach ($pluginHeaders as $headerItem => $headerValue) { foreach ($pluginHeaders as $headerItem => $headerValue) {
//# @@TODO, do we need to sanitise them? //# @@TODO, do we need to sanitise them?
$this->addCustomHeader($headerItem.': '.$headerValue); $this->addCustomHeader($headerItem, $headerValue);
} }
} }
} }
if (!parent::Send()) { if (!parent::Send()) {
logEvent(s('Error sending email to %s', $to_addr).' '.$this->Err orInfo); logEvent(s('Error sending email to %s', $to_addr).' '.$this->Err orInfo);
return 0; return 0;
} }
} else { } else {
logEvent(s('Error, empty message-body sending email to %s', $to_addr )); logEvent(s('Error, empty message-body sending email to %s', $to_addr ));
return 0; return 0;
} }
return 1; return 1;
} }
public function Send()
{
if (!parent::Send()) {
return 0;
}
return 1;
}
public function add_attachment($contents, $filename, $mimetype) public function add_attachment($contents, $filename, $mimetype)
{ {
$this->AddStringAttachment($contents, $filename, 'base64', $mimetype); $this->AddStringAttachment($contents, $filename, 'base64', $mimetype);
} }
public function find_html_images($templateid) public function find_html_images($templateid)
{ {
//if (!$templateid) return; //if (!$templateid) return;
//# no template can be templateid 0, find the powered by image //# no template can be templateid 0, find the powered by image
$templateid = sprintf('%d', $templateid); $templateid = sprintf('%d', $templateid);
 End of changes. 8 change blocks. 
41 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)