diff options
author | Andrew Dolgov <[email protected]> | 2013-03-22 22:09:34 -0700 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-03-22 22:09:34 -0700 |
commit | 6ef8ec84cb66b053edf84e8738a04089f8ca1b07 (patch) | |
tree | 893ba2dd3d5cb00e733f0293563da444d86fa9db /plugins/mail/init.php | |
parent | 0d6ecb1f1cc663497bdd8fccb3f2dc66d2cdb0b9 (diff) | |
parent | 1b2afd2bd3dc19cdd36da47cc52040a83cdb3b68 (diff) |
Merge pull request #73 from derekmurawsky/dmChanges
Centralized mail handling per post on google + community.
Diffstat (limited to 'plugins/mail/init.php')
-rw-r--r-- | plugins/mail/init.php | 27 |
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(); |