Modify rcube_smtp::send_mail() so it is possible to send message by

specifying only the message stream no headers, it's for cases when
the stream already contains a complete message.
pull/284/head^2
Aleksander Machniak 9 years ago
parent ff40683404
commit 36a7f57345

@ -208,11 +208,6 @@ class rcube_smtp
else if (is_string($headers)) {
$text_headers = $headers;
}
else {
$this->reset();
$this->response[] = "Invalid message headers";
return false;
}
// exit if no from address is given
if (!isset($from)) {
@ -276,8 +271,11 @@ class rcube_smtp
if (is_resource($body)) {
// file handle
$data = $body;
if ($text_headers) {
$text_headers = preg_replace('/[\r\n]+$/', '', $text_headers);
}
}
else {
// Concatenate headers and body so it can be passed by reference to SMTP_CONN->data
// so preg_replace in SMTP_CONN->quotedata will store a reference instead of a copy.

Loading…
Cancel
Save