* 'displayed'
* 'deleted'
* </pre>
+ * @param string $name The name of the local server.
* @param string $maildriver The mail driver used to send the message.
* @param array $mailparams Any parameters the mail driver may need.
* @param array $mod The list of modifications.
*
* @throws Horde_Mime_Exception
*/
- public function generate($action, $sending, $type, $maildriver,
+ public function generate($action, $sending, $type, $name, $maildriver,
$mailparams = array(), $mod = array(),
$err = array())
{
/* The second part is a machine-parseable description. */
$part_two = new Horde_Mime_Part('message/disposition-notification');
- $part_two_text = array('Reporting-UA: ' . $GLOBALS['conf']['server']['name'] . '; ' . $ua . "\n");
+ $part_two_text = array('Reporting-UA: ' . $name . '; ' . $ua . "\n");
if (!empty($orig_recip)) {
$part_two_text[] = 'Original-Recipient: rfc822;' . $orig_recip . "\n";
}
/* Send out the MDN now. */
try {
$mail_driver = IMP_Compose::getMailDriver();
- $mdn->generate(false, $confirmed, 'displayed', $mail_driver['driver'], $mail_driver['params']);
+ $mdn->generate(false, $confirmed, 'displayed', $GLOBALS['conf']['server']['name'], $mail_driver['driver'], $mail_driver['params']);
IMP_Maillog::log('mdn', $msg_id, 'displayed');
$success = true;