summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/func.inc16
-rw-r--r--program/steps/mail/sendmail.inc6
2 files changed, 11 insertions, 11 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 718461ec2..af3f6e72f 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -1040,18 +1040,18 @@ function rcmail_deliver_message(&$message, $from, $mailto)
function rcmail_send_mdn($uid)
{
- global $CONFIG, $USER, $IMAP;
+ global $RCMAIL, $IMAP;
$message = new rcube_message($uid);
if ($message->headers->mdn_to && !$message->headers->mdn_sent)
{
- $identity = $USER->get_identity();
+ $identity = $RCMAIL->user->get_identity();
$sender = format_email_recipient($identity['email'], $identity['name']);
$recipient = array_shift($IMAP->decode_address_list($message->headers->mdn_to));
$mailto = $recipient['mailto'];
- $compose = new rcube_mail_mime(rcmail_header_delm());
+ $compose = new rcube_mail_mime($RCMAIL->config->header_delimiter());
$compose->setParam(array(
'text_encoding' => 'quoted-printable',
'html_encoding' => 'quoted-printable',
@@ -1067,21 +1067,21 @@ function rcmail_send_mdn($uid)
'From' => $sender,
'To' => $message->headers->mdn_to,
'Subject' => rcube_label('receiptread') . ': ' . $message->subject,
- 'Message-ID' => sprintf('<%s@%s>', md5(uniqid('rcmail'.rand(),true)), rcmail_mail_domain($_SESSION['imap_host'])),
+ 'Message-ID' => sprintf('<%s@%s>', md5(uniqid('rcmail'.rand(),true)), $RCMAIL->config->mail_domain($_SESSION['imap_host'])),
'X-Sender' => $identity['email'],
'Content-Type' => 'multipart/report; report-type=disposition-notification',
);
- if (!empty($CONFIG['useragent']))
- $headers['User-Agent'] = $CONFIG['useragent'];
+ if ($agent = $RCMAIL->config->get('useragent'))
+ $headers['User-Agent'] = $agent;
$body = rcube_label("yourmessage") . "\r\n\r\n" .
"\t" . rcube_label("to") . ': ' . rcube_imap::decode_mime_string($message->headers->to, $message->headers->charset) . "\r\n" .
"\t" . rcube_label("subject") . ': ' . $message->subject . "\r\n" .
- "\t" . rcube_label("sent") . ': ' . format_date($message->headers->date, $CONFIG['date_long']) . "\r\n" .
+ "\t" . rcube_label("sent") . ': ' . format_date($message->headers->date, $RCMAIL->config->get('date_long')) . "\r\n" .
"\r\n" . rcube_label("receiptnote") . "\r\n";
- $ua = !empty($CONFIG['useragent']) ? $CONFIG['useragent'] : "RoundCube Webmail (Version ".RCMAIL_VERSION.")";
+ $ua = $RCMAIL->config->get('useragent', "RoundCube Webmail (Version ".RCMAIL_VERSION.")");
$report = "Reporting-UA: $ua\r\n";
if ($message->headers->to)
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 72ef9f4d6..3860c4fd0 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -113,7 +113,7 @@ function rcmail_attach_emoticons(&$mime_message)
if (strlen($_POST['_draft_saveid']) > 3)
$olddraftmessageid = get_input_value('_draft_saveid', RCUBE_INPUT_POST);
-$message_id = sprintf('<%s@%s>', md5(uniqid('rcmail'.rand(),true)), rcmail_mail_domain($_SESSION['imap_host']));
+$message_id = sprintf('<%s@%s>', md5(uniqid('rcmail'.rand(),true)), $RCMAIL->config->mail_domain($_SESSION['imap_host']));
$savedraft = !empty($_POST['_draft']) ? TRUE : FALSE;
// remove all scripts and act as called in frame
@@ -207,7 +207,7 @@ if (!empty($_POST['_receipt']))
// additional headers
if ($CONFIG['http_received_header'])
{
- $nldlm = rcmail_header_delm() . "\t";
+ $nldlm = $RCMAIL->config->header_delimiter() . "\t";
$headers['Received'] = wordwrap('from ' . (isset($_SERVER['HTTP_X_FORWARDED_FOR']) ?
gethostbyaddr($_SERVER['HTTP_X_FORWARDED_FOR']).' ['.$_SERVER['HTTP_X_FORWARDED_FOR'].']'.$nldlm.' via ' : '') .
gethostbyaddr($_SERVER['REMOTE_ADDR']).' ['.$_SERVER['REMOTE_ADDR'].']'.$nldlm.'with ' .
@@ -232,7 +232,7 @@ $isHtmlVal = strtolower(get_input_value('_is_html', RCUBE_INPUT_POST));
$isHtml = ($isHtmlVal == "1");
// create extended PEAR::Mail_mime instance
-$MAIL_MIME = new rcube_mail_mime(rcmail_header_delm());
+$MAIL_MIME = new rcube_mail_mime($RCMAIL->config->header_delimiter());
// For HTML-formatted messages, construct the MIME message with both
// the HTML part and the plain-text part