| 50 | | AmpacheMail::$from = $GLOBALS['user']->fullname."<".$GLOBALS['user']->email.">"; |
| 51 | | AmpacheMail::$subject = scrub_in($_REQUEST['subject']); |
| 52 | | AmpacheMail::$message = scrub_in($_REQUEST['message']); |
| | 60 | if(function_exists('mb_encode_mimeheader')) { |
| | 61 | $fullname = mb_encode_mimeheader($GLOBALS['user']->fullname); |
| | 62 | } else { |
| | 63 | $fullname = $GLOBALS['user']->fullname; |
| | 64 | } |
| | 65 | AmpacheMail::$to = $fullname . "<" . $GLOBALS['user']->email . ">"; |
| | 66 | AmpacheMail::$from = $fullname . "<" . $GLOBALS['user']->email . ">"; |
| | 67 | AmpacheMail::$subject = scrub_in($_REQUEST['subject']); |
| | 68 | if(function_exists('mb_eregi_replace')) { |
| | 69 | AmpacheMail::$message = mb_eregi_replace("\r\n", "\n", scrub_in($_REQUEST['message'])); |
| | 70 | } else { |
| | 71 | AmpacheMail::$message = scrub_in($_REQUEST['message']); |
| | 72 | } |
| | 73 | AmpacheMail::$additional_header = array(); |
| | 74 | AmpacheMail::$additional_header[] = 'X-Ampache-Mailer: 0.0.1'; |
| | 75 | if(function_exists('mb_send_mail')) { |
| | 76 | AmpacheMail::$additional_header[] = 'Content-Type: text/plain; charset=UTF-8'; |
| | 77 | AmpacheMail::$additional_header[] = 'Content-Transfer-Encoding: 8bit'; |
| | 78 | } else { |
| | 79 | AmpacheMail::$additional_header[] = 'Content-Type: text/plain; charset=us-ascii'; |
| | 80 | AmpacheMail::$additional_header[] = 'Content-Transfer-Encoding: 7bit'; |
| | 81 | } |
| | 82 | AmpacheMail::$additional_header[] = "From: " . AmpacheMail::$from; |
| | 83 | AmpacheMail::$additional_header[] = "Bcc: $recipient"; |
| | 84 | AmpacheMail::$sender = $GLOBALS['user']->email; |
| | 85 | |