function dw_send_support_email($to, $subject, $message, $replacements = array()) { // auto-replace support email address and domain if (empty($replacements['support_email'])) { $replacements['support_email'] = $GLOBALS['dw_config']['email']['support']; } $replacements['domain'] = $GLOBALS['dw_config']['domain']; $subject = dw_email_replace($subject, $replacements); $message = dw_email_replace($message, $replacements); DatawrapperHooks::execute(DatawrapperHooks::SEND_EMAIL, $to, $subject, $message, 'From: noreply@' . $GLOBALS['dw_config']['domain'] . "\r\n" . 'Reply-To: ' . $GLOBALS['dw_config']['email']['support'] . "\r\n" . 'X-Mailer: PHP/' . phpversion()); }
function dw_send_support_email($to, $subject, $message, $replacements = array()) { $config = $GLOBALS['dw_config']; // auto-replace support email address and domain if (empty($replacements['support_email'])) { $replacements['support_email'] = $config['email']['support']; } $replacements['domain'] = $config['domain']; $subject = dw_email_replace($subject, $replacements); $message = dw_email_replace($message, $replacements); $from = isset($config['email']['sender']) ? $config['email']['sender'] : 'noreply@' . $config['domain']; DatawrapperHooks::execute(DatawrapperHooks::SEND_EMAIL, $to, $subject, $message, 'From: ' . $from . "\r\n" . 'Reply-To: ' . $config['email']['support']); }
function send_dw_mail($to, $subject, $message, $replacements = array()) { $config = $GLOBALS['dw_config']; // auto-replace support email address and domain if (empty($replacements['support_email'])) { $replacements['support_email'] = $config['email']['support']; } $replacements['domain'] = $config['domain']; $subject = dw_email_replace($subject, $replacements); $message = dw_email_replace($message, $replacements); $from = isset($config['email']['sender']) ? $config['email']['sender'] : 'noreply@' . $config['domain']; $headers = 'From: ' . $from . "\r\n" . 'Reply-To: ' . $config['email']['support']; return mail($to, $subject, $message, $headers); }