X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fsmtp.php;h=fd179db65baecbf0225982ee74d38bf5c4f5c08c;hb=6332704d9e75c774f164dda49a29f87a3454f789;hp=dffc1bf72794b4ca7fa00db8db38fc541bf6fafb;hpb=e21f505bf60fe7b1d3753b5f5d9e3e37d7025e27;p=squirrelmail.git
diff --git a/functions/smtp.php b/functions/smtp.php
index dffc1bf7..fd179db6 100644
--- a/functions/smtp.php
+++ b/functions/smtp.php
@@ -11,7 +11,8 @@
return;
define('smtp_php', true);
- include('../functions/addressbook.php');
+ require_once('../functions/addressbook.php');
+ require_once('../functions/plugin.php');
global $username, $popuser, $domain;
@@ -360,8 +361,9 @@
}
function sendSMTP($t, $c, $b, $subject, $body, $more_headers) {
- global $username, $popuser, $domain, $version, $smtpServerAddress, $smtpPort,
- $data_dir, $color, $use_authenticated_smtp, $identity, $key;
+ global $username, $popuser, $domain, $version, $smtpServerAddress,
+ $smtpPort, $data_dir, $color, $use_authenticated_smtp, $identity,
+ $key, $onetimepad;
$to = expandAddrs(parseAddrs($t));
$cc = expandAddrs(parseAddrs($c));
@@ -446,7 +448,7 @@
if ($num != 250) {
$tmp = nl2br(htmlspecialchars($tmp));
displayPageHeader($color, 'None');
- include ("../functions/display_messages.php");
+ include_once('../functions/display_messages.php');
$msg = "Message not sent!
\nReason given: $tmp";
plain_error_message($msg, $color);
return(0);
@@ -552,9 +554,9 @@
}
if ($status == 0) {
- include '../functions/page_header.php';
+ include_once('../functions/page_header.php');
displayPageHeader($color, 'None');
- include ("../functions/display_messages.php");
+ include_once('../functions/display_messages.php');
$lines = nl2br(htmlspecialchars($lines));
$msg = $message . "
\nServer replied: $lines";
plain_error_message($msg, $color);
@@ -566,8 +568,11 @@
function sendMessage($t, $c, $b, $subject, $body, $reply_id) {
global $useSendmail, $msg_id, $is_reply, $mailbox, $onetimepad;
global $data_dir, $username, $domain, $key, $version, $sent_folder, $imapServerAddress, $imapPort;
+ global $more_headers;
$more_headers = Array();
+ do_hook("smtp_send");
+
$imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 1);
if (isset($reply_id) && $reply_id) {
@@ -616,5 +621,5 @@
return $length;
}
-
-?>
+
+?>
\ No newline at end of file