diff options
author | momo-i <momo-i@ampache> | 2009-05-06 22:41:13 +0000 |
---|---|---|
committer | momo-i <momo-i@ampache> | 2009-05-06 22:41:13 +0000 |
commit | b85fa736cfdab471196d325edd2b77fc2b6ff6e6 (patch) | |
tree | e46ae02d53cef382d63a2d935f1ef94e10dc4e89 /admin | |
parent | c93613813d191f7955dc74d74c8b8dcabc6c7de7 (diff) | |
download | ampache-b85fa736cfdab471196d325edd2b77fc2b6ff6e6.tar.gz ampache-b85fa736cfdab471196d325edd2b77fc2b6ff6e6.tar.bz2 ampache-b85fa736cfdab471196d325edd2b77fc2b6ff6e6.zip |
Add phpmailer and change mail function.
Diffstat (limited to 'admin')
-rw-r--r-- | admin/mail.php | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/admin/mail.php b/admin/mail.php index b2c13e32..19a21b91 100644 --- a/admin/mail.php +++ b/admin/mail.php @@ -63,27 +63,16 @@ switch ($_REQUEST['action']) { $fullname = $GLOBALS['user']->fullname; } AmpacheMail::$to = $fullname . "<" . $GLOBALS['user']->email . ">"; - AmpacheMail::$from = $fullname . "<" . $GLOBALS['user']->email . ">"; AmpacheMail::$subject = scrub_in($_REQUEST['subject']); if(function_exists('mb_eregi_replace')) { AmpacheMail::$message = mb_eregi_replace("\r\n", "\n", scrub_in($_REQUEST['message'])); } else { AmpacheMail::$message = scrub_in($_REQUEST['message']); } - AmpacheMail::$additional_header = array(); - AmpacheMail::$additional_header[] = 'X-Ampache-Mailer: 0.0.1'; - AmpacheMail::$additional_header[] = "From: " . AmpacheMail::$from; - AmpacheMail::$additional_header[] = "Bcc: $recipient"; - if(function_exists('mb_send_mail')) { - AmpacheMail::$additional_header[] = 'Content-Type: text/plain; charset=UTF-8'; - AmpacheMail::$additional_header[] = 'Content-Transfer-Encoding: 8bit'; - } else { - AmpacheMail::$additional_header[] = 'Content-Type: text/plain; charset=us-ascii'; - AmpacheMail::$additional_header[] = 'Content-Transfer-Encoding: 7bit'; - } AmpacheMail::$sender = $GLOBALS['user']->email; - AmpacheMail::send(); + AmpacheMail::$fromname = $fullname; + AmpacheMail::send(); /* Confirmation Send */ $url = Config::get('web_path') . '/admin/mail.php'; |