Feature #22212 » sendMail_v2.patch
t3lib/class.t3lib_beuserauth.php (working copy) | ||
---|---|---|
$prefix='[AdminLoginWarning]';
|
||
}
|
||
if ($warn) {
|
||
mail($GLOBALS['TYPO3_CONF_VARS']['BE']['warning_email_addr'],
|
||
t3lib_div::plainMail($GLOBALS['TYPO3_CONF_VARS']['BE']['warning_email_addr'],
|
||
$prefix.' '.$subject,
|
||
$msg,
|
||
$this->notifyHeader
|
||
... | ... | |
// If An email should be sent to the current user, do that:
|
||
if ($this->uc['emailMeAtLogin'] && strstr($this->user['email'],'@')) {
|
||
mail($this->user['email'],
|
||
t3lib_div::plainMail($this->user['email'],
|
||
$subject,
|
||
$msg,
|
||
$this->notifyHeader
|
t3lib/class.t3lib_div.php (working copy) | ||
---|---|---|
// So we stick to LF in all cases.
|
||
$headers = trim(implode(chr(10), self::trimExplode(chr(10), $headers, true))); // Make sure no empty lines are there.
|
||
$ret = @mail($email, $subject, $message, $headers);
|
||
return t3lib_div::plainMail($email, $subject, $message, $headers);
|
||
}
|
||
/**
|
||
* Proxy for the PHP mail() function. Adds possibility to hook in and send the mails in a different way.
|
||
*
|
||
* @param string Email address to send to. (see PHP function mail())
|
||
* @param string Subject line, non-encoded. (see PHP function mail())
|
||
* @param string Message content, non-encoded. (see PHP function mail())
|
||
* @param string Additional headers for the mail (see PHP function mail())
|
||
* @param string Additional flags for the sending mail tool (see PHP function mail())
|
||
*/
|
||
public static function plainMail($to, $subject, $message, $additional_headers = null, $additional_parameters = null) {
|
||
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['substitudeMailDelivery'])) {
|
||
$params = array(
|
||
'to' => $to,
|
||
'subject' => $subject,
|
||
'message' => $message,
|
||
'additional_headers' => $additional_headers,
|
||
'additional_parameters' => $additional_parameters
|
||
);
|
||
$fakeThis = FALSE;
|
||
$ret = true;
|
||
foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['substitudeMailDelivery'] as $hookMethod) {
|
||
$ret = $ret && self::callUserFunction($hookMethod,$params,$fakeThis);
|
||
}
|
||
} else {
|
||
$ret = @mail($to, $subject, $message, $additional_headers, $additional_parameters);
|
||
}
|
||
if (!$ret) {
|
||
self::sysLog('Mail to "'.$email.'" could not be sent (Subject: "'.$subject.'").', 'Core', 3);
|
||
t3lib_div::sysLog('Mail to "' . $email . '" could not be sent (Subject: "' . $subject . '").', 'Core', 3);
|
||
}
|
||
return $ret;
|
||
}
|
||
... | ... | |
// send message per mail
|
||
elseif ($type == 'mail') {
|
||
list($to,$from) = explode('/',$destination);
|
||
mail($to, 'Warning - error in TYPO3 installation',
|
||
t3lib_div::plainMail($to, 'Warning - error in TYPO3 installation',
|
||
'Host: '.$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogHost']."\n".
|
||
'Extension: '.$extKey."\n".
|
||
'Severity: '.$severity."\n".
|
t3lib/class.t3lib_htmlmail.php (working copy) | ||
---|---|---|
// If safe mode is on, the fifth parameter to mail is not allowed, so the fix wont work on unix with safe_mode=On
|
||
$returnPathPossible = (!ini_get('safe_mode') && $this->forceReturnPath);
|
||
if ($returnPathPossible) {
|
||
$mailWasSent = mail($recipient,
|
||
$mailWasSent = t3lib_div::plainMail($recipient,
|
||
$this->subject,
|
||
$this->message,
|
||
$this->headers,
|
||
$returnPath);
|
||
} else {
|
||
$mailWasSent = mail($recipient,
|
||
$mailWasSent = t3lib_div::plainMail($recipient,
|
||
$this->subject,
|
||
$this->message,
|
||
$this->headers);
|
||
... | ... | |
// Sending a copy
|
||
if ($recipient_copy) {
|
||
if ($returnPathPossible) {
|
||
$mailWasSent = mail($recipient_copy,
|
||
$mailWasSent = t3lib_div::plainMail($recipient_copy,
|
||
$this->subject,
|
||
$this->message,
|
||
$this->headers,
|
||
$returnPath);
|
||
} else {
|
||
$mailWasSent = mail($recipient_copy,
|
||
$mailWasSent = t3lib_div::plainMail($recipient_copy,
|
||
$this->subject,
|
||
$this->message,
|
||
$this->headers);
|
||
... | ... | |
$theParts = explode('/',$this->auto_respond_msg,2);
|
||
$theParts[1] = str_replace("/",chr(10),$theParts[1]);
|
||
if ($returnPathPossible) {
|
||
$mailWasSent = mail($this->from_email,
|
||
$mailWasSent = t3lib_div::plainMail($this->from_email,
|
||
$theParts[0],
|
||
$theParts[1],
|
||
'From: ' . $recipient,
|
||
$returnPath);
|
||
} else {
|
||
$mailWasSent = mail($this->from_email,
|
||
$mailWasSent = t3lib_div::plainMail($this->from_email,
|
||
$theParts[0],
|
||
$theParts[1],
|
||
'From: ' . $recipient);
|
t3lib/class.t3lib_userauthgroup.php (working copy) | ||
---|---|---|
$email_body.= date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'].' '.$GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'],$testRows['tstamp']).': '.@sprintf($testRows['details'],''.$theData[0],''.$theData[1],''.$theData[2]);
|
||
$email_body.= chr(10);
|
||
}
|
||
mail( $email,
|
||
t3lib_div::plainMail($email,
|
||
$subject,
|
||
$email_body,
|
||
'From: TYPO3 Login WARNING<>'
|
typo3/sysext/install/mod/class.tx_install.php (working copy) | ||
---|---|---|
if ($wEmail) {
|
||
$subject="Install Tool Login at '".$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']."'";
|
||
$email_body="There has been a Install Tool login at TYPO3 site '".$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']."' (".t3lib_div::getIndpEnv('HTTP_HOST').") from remote address '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndpEnv('REMOTE_HOST').')';
|
||
mail($wEmail,
|
||
t3lib_div::plainMail($wEmail,
|
||
$subject,
|
||
$email_body,
|
||
'From: TYPO3 Install Tool WARNING <>'
|
||
... | ... | |
$email_body="There has been an Install Tool login attempt at TYPO3 site '".$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']."' (".t3lib_div::getIndpEnv('HTTP_HOST').").
|
||
The MD5 hash of the last 5 characters of the password tried was '".substr(md5($p), -5)."'
|
||
REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndpEnv('REMOTE_HOST').')';
|
||
mail($wEmail,
|
||
t3lib_div::plainMail($wEmail,
|
||
$subject,
|
||
$email_body,
|
||
'From: TYPO3 Install Tool WARNING <>'
|