* adjust mail.
This commit is contained in:
@@ -125,7 +125,7 @@ class SMTP {
|
||||
}
|
||||
|
||||
// connect to the smtp server
|
||||
$this->smtp_conn = @fsockopen($host, // the host of the server
|
||||
$this->smtp_conn = fsockopen($host, // the host of the server
|
||||
$port, // the port to use
|
||||
$errno, // error number if any
|
||||
$errstr, // error message if any
|
||||
@@ -385,7 +385,7 @@ class SMTP {
|
||||
|
||||
$max_line_length = 998; // used below; set here for ease in change
|
||||
|
||||
while(list(,$line) = @each($lines)) {
|
||||
while(list(,$line) = each($lines)) {
|
||||
$lines_out = null;
|
||||
if($line == "" && $in_headers) {
|
||||
$in_headers = false;
|
||||
@@ -414,7 +414,7 @@ class SMTP {
|
||||
$lines_out[] = $line;
|
||||
|
||||
// send the lines to the server
|
||||
while(list(,$line_out) = @each($lines_out)) {
|
||||
while(list(,$line_out) = each($lines_out)) {
|
||||
if(strlen($line_out) > 0)
|
||||
{
|
||||
if(substr($line_out, 0, 1) == ".") {
|
||||
@@ -794,7 +794,7 @@ class SMTP {
|
||||
*/
|
||||
private function get_lines() {
|
||||
$data = "";
|
||||
while($str = @fgets($this->smtp_conn,515)) {
|
||||
while($str = fgets($this->smtp_conn,515)) {
|
||||
if($this->do_debug >= 4) {
|
||||
echo "SMTP -> get_lines(): \$data was \"$data\"" . $this->CRLF . '<br />';
|
||||
echo "SMTP -> get_lines(): \$str is \"$str\"" . $this->CRLF . '<br />';
|
||||
@@ -811,4 +811,4 @@ class SMTP {
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -1236,13 +1236,13 @@ class PHPMailer {
|
||||
$file = tempnam('', 'mail');
|
||||
file_put_contents($file, $body); //TODO check this worked
|
||||
$signed = tempnam("", "signed");
|
||||
if (@openssl_pkcs7_sign($file, $signed, "file://".$this->sign_cert_file, array("file://".$this->sign_key_file, $this->sign_key_pass), NULL)) {
|
||||
@unlink($file);
|
||||
@unlink($signed);
|
||||
if (openssl_pkcs7_sign($file, $signed, "file://".$this->sign_cert_file, array("file://".$this->sign_key_file, $this->sign_key_pass), NULL)) {
|
||||
unlink($file);
|
||||
unlink($signed);
|
||||
$body = file_get_contents($signed);
|
||||
} else {
|
||||
@unlink($file);
|
||||
@unlink($signed);
|
||||
unlink($file);
|
||||
unlink($signed);
|
||||
throw new phpmailerException($this->Lang("signing").openssl_error_string());
|
||||
}
|
||||
} catch (phpmailerException $e) {
|
||||
@@ -1343,7 +1343,7 @@ class PHPMailer {
|
||||
*/
|
||||
public function AddAttachment($path, $name = '', $encoding = 'base64', $type = 'application/octet-stream') {
|
||||
try {
|
||||
if ( !@is_file($path) ) {
|
||||
if ( !is_file($path) ) {
|
||||
throw new phpmailerException($this->Lang('file_access') . $path, self::STOP_CONTINUE);
|
||||
}
|
||||
$filename = basename($path);
|
||||
@@ -1782,7 +1782,7 @@ class PHPMailer {
|
||||
*/
|
||||
public function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream') {
|
||||
|
||||
if ( !@is_file($path) ) {
|
||||
if ( !is_file($path) ) {
|
||||
$this->SetError($this->Lang('file_access') . $path);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#resultWin{width:100%; height:200px; border:none}
|
||||
#resultWin{width:100%; height:230px; border:none}
|
||||
div .f-right{font-weight:normal; color:red; padding-left:5px}
|
||||
|
||||
@@ -287,7 +287,7 @@ class mailModel extends model
|
||||
}
|
||||
catch (phpmailerException $e)
|
||||
{
|
||||
$this->errors[] = trim(strip_tags($e->errorMessage()));
|
||||
$this->errors[] = nl2br(trim(strip_tags($e->errorMessage()))) . '<br />' . ob_get_contents();
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
@@ -10,10 +10,12 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php if(isset($error)):?>
|
||||
<div class='alert alert-warning with-icon'><i class='icon-frown'></i><div class='content'><?php echo str_replace('\n', '<br>', join('', $error));?></div></div>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<div class='alert alert-warning with-icon'><i class='icon-frown'></i><div class='content'><?php echo join('', $error);?></div></div>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
<?php else:?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='container mw-700px'>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
@@ -36,7 +38,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<table class='table table-form'><tr><td><iframe id='resultWin'></iframe></td></tr></table>
|
||||
<table class='table table-form'><tr><td><iframe id='resultWin' name='resultWin'></iframe></td></tr></table>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php endif;?>
|
||||
|
||||
Reference in New Issue
Block a user