summaryrefslogtreecommitdiff
path: root/plugins/mail
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-22 22:09:34 -0700
committerAndrew Dolgov <[email protected]>2013-03-22 22:09:34 -0700
commit6ef8ec84cb66b053edf84e8738a04089f8ca1b07 (patch)
tree893ba2dd3d5cb00e733f0293563da444d86fa9db /plugins/mail
parent0d6ecb1f1cc663497bdd8fccb3f2dc66d2cdb0b9 (diff)
parent1b2afd2bd3dc19cdd36da47cc52040a83cdb3b68 (diff)
Merge pull request #73 from derekmurawsky/dmChanges
Centralized mail handling per post on google + community.
Diffstat (limited to 'plugins/mail')
-rw-r--r--plugins/mail/init.php27
1 files changed, 5 insertions, 22 deletions
diff --git a/plugins/mail/init.php b/plugins/mail/init.php
index a4817a15d..49de96afd 100644
--- a/plugins/mail/init.php
+++ b/plugins/mail/init.php
@@ -137,7 +137,7 @@ class Mail extends Plugin {
function sendEmail() {
$secretkey = $_REQUEST['secretkey'];
- require_once 'lib/phpmailer/class.phpmailer.php';
+ require_once 'classes/ttrssmailer.php';
$reply = array();
@@ -146,35 +146,18 @@ class Mail extends Plugin {
$_SESSION['email_secretkey'] = '';
- $destination = $_REQUEST['destination'];
- $subject = $_REQUEST['subject'];
- $content = $_REQUEST['content'];
-
$replyto = strip_tags($_SESSION['email_replyto']);
$fromname = strip_tags($_SESSION['email_fromname']);
- $mail = new PHPMailer();
-
- $mail->PluginDir = "lib/phpmailer/";
- $mail->SetLanguage("en", "lib/phpmailer/language/");
-
- $mail->CharSet = "UTF-8";
+ $mail = new ttrssMailer();
$mail->From = $replyto;
$mail->FromName = $fromname;
- $mail->AddAddress($destination);
-
- if (SMTP_HOST) {
- $mail->Host = SMTP_HOST;
- $mail->Mailer = "smtp";
- $mail->SMTPAuth = SMTP_LOGIN != '';
- $mail->Username = SMTP_LOGIN;
- $mail->Password = SMTP_PASSWORD;
- }
+ $mail->AddAddress($_REQUEST['destination']);
$mail->IsHTML(false);
- $mail->Subject = $subject;
- $mail->Body = $content;
+ $mail->Subject = $_REQUEST['subject'];
+ $mail->Body = $_REQUEST['content'];
$rc = $mail->Send();