[Pkg-owncloud-commits] [owncloud] 262/394: add smtp port configuration option
David Prévot
taffit at alioth.debian.org
Fri Nov 8 23:12:21 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.
commit 5c421b753d70a062d51f7bca06380378742fd480
Author: Thomas Mueller <thomas.mueller at tmit.eu>
Date: Wed Jan 2 19:04:08 2013 +0100
add smtp port configuration option
---
config/config.sample.php | 3 +++
lib/mail.php | 14 ++++++++------
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/config/config.sample.php b/config/config.sample.php
index aec9c45..b471667 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -66,6 +66,9 @@ $CONFIG = array(
/* Host to use for sending mail, depends on mail_smtpmode if this is used */
"mail_smtphost" => "127.0.0.1",
+/* Port to use for sending mail, depends on mail_smtpmode if this is used */
+"mail_smtpport" => 25,
+
/* authentication needed to send mail, depends on mail_smtpmode if this is used
* (false = disable authentication)
*/
diff --git a/lib/mail.php b/lib/mail.php
index 8d30fff..12c3a57 100644
--- a/lib/mail.php
+++ b/lib/mail.php
@@ -25,12 +25,18 @@ class OC_Mail {
* @param string $mailtext
* @param string $fromaddress
* @param string $fromname
- * @param bool $html
+ * @param bool|int $html
+ * @param string $altbody
+ * @param string $ccaddress
+ * @param string $ccname
+ * @param string $bcc
+ * @throws Exception
*/
public static function send($toaddress,$toname,$subject,$mailtext,$fromaddress,$fromname,$html=0,$altbody='',$ccaddress='',$ccname='',$bcc='') {
$SMTPMODE = OC_Config::getValue( 'mail_smtpmode', 'sendmail' );
$SMTPHOST = OC_Config::getValue( 'mail_smtphost', '127.0.0.1' );
+ $SMTPPORT = OC_Config::getValue( 'mail_smtpport', 25 );
$SMTPAUTH = OC_Config::getValue( 'mail_smtpauth', false );
$SMTPUSERNAME = OC_Config::getValue( 'mail_smtpname', '' );
$SMTPPASSWORD = OC_Config::getValue( 'mail_smtppassword', '' );
@@ -49,6 +55,7 @@ class OC_Mail {
$mailo->Host = $SMTPHOST;
+ $mailo->Port = $SMTPPORT;
$mailo->SMTPAuth = $SMTPAUTH;
$mailo->Username = $SMTPUSERNAME;
$mailo->Password = $SMTPPASSWORD;
@@ -89,8 +96,6 @@ class OC_Mail {
}
}
-
-
/**
* return the footer for a mail
*
@@ -103,7 +108,4 @@ class OC_Mail {
return($txt);
}
-
-
-
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list