require_once 'Mail/RFC822.php';
require_once 'Horde/Browser.php';
+require_once 'Horde/Nls.php';
require_once 'Horde/String.php';
require dirname(__FILE__) . '/../../../lib/Horde/Mime.php';
require dirname(__FILE__) . '/../../../lib/Horde/Mime/Address.php';
-echo Horde_Mime::encodeAddress('"John Doe" <john@example.com>, Group: peter@example.com, jane@example.com;');
+echo Horde_Mime::encodeAddress('"John Doe" <john@example.com>, Group: peter@example.com, jane@example.com;', 'us-ascii');
?>
--EXPECT--
$mail->addHeader('From', 'sender@example.com');
$mail->removeHeader('Cc');
-echo $mail->send('dummy');
+echo $mail->send(array('type' => 'dummy'));
?>
--EXPECTF--
'Empfänger <recipient@example.com>',
'sender@example.com', 'iso-8859-1');
$mail->addHeader('Cc', 'Der schöne Peter <peter@example.com>', 'iso-8859-15');
-echo $mail->send('dummy');
+echo $mail->send(array('type' => 'dummy'));
?>
--EXPECTF--
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
-H=FCbsche Umlaute
- und Leerzeichen.
+H=FCbsche Umlaute=0A und Leerzeichen.=0A
\ No newline at end of file
file_get_contents(dirname(__FILE__) . '/fixtures/attachment.bin'),
null, 'attachment');
-echo $mail->send('dummy');
+echo $mail->send(array('type' => 'dummy'));
?>
--EXPECTF--
WnfDtmxmIEJveGvDpG1wZmVyIGphZ2VuIFZpa3RvciBxdWVyIMO8YmVyIGRlbiBncm/Dn2VuIFN5
bHRlciBEZWljaC4K
-
--=_%s--
$mail = new Horde_Mime_Mail('My Subject', null, 'recipient@example.com',
'sender@example.com');
$mail->setBody("This is\nthe plain text body.");
-echo $mail->send('dummy');
+echo $mail->send(array('type' => 'dummy'));
echo "====================================================================\n";
'sender@example.com');
$mail->setHTMLBody("<h1>Header Title</h1>\n<p>This is<br />the html text body.</p>",
'iso-8859-1', false);
-echo $mail->send('dummy');
+echo $mail->send(array('type' => 'dummy'));
echo "====================================================================\n";
$mail = new Horde_Mime_Mail('My Subject', null, 'recipient@example.com',
'sender@example.com');
$mail->setHTMLBody("<h1>Header Title</h1>\n<p>This is<br />the html text body.</p>");
-echo $mail->send('dummy');
+echo $mail->send(array('type' => 'dummy'));
?>
--EXPECTF--
$mail->addAttachment(dirname(__FILE__) . '/fixtures/attachment.bin');
$mail->addAttachment(dirname(__FILE__) . '/mail_dummy.inc', 'my_name.html', 'text/html', 'iso-8859-15');
-echo $mail->send('dummy');
+echo $mail->send(array('type' => 'dummy'));
?>
--EXPECTF--
WnfDtmxmIEJveGvDpG1wZmVyIGphZ2VuIFZpa3RvciBxdWVyIMO8YmVyIGRlbiBncm/Dn2VuIFN5
bHRlciBEZWljaC4K
-
--=_%s
Content-Type: text/html; charset=iso-8859-15; name=my_name.html
Content-Disposition: attachment; filename=my_name.html
echo "====================================================================\n";
$mail->addHeader('To', 'Änderung <other@example.com>', 'utf-8');
-$raw = $mail->send('dummy');
+$raw = $mail->send(array('type' => 'dummy'));
echo $raw;
preg_match('/^Message-ID: (.*)$/m', $raw, $id2);
====================================================================
Subject: My Subject
From: sender@example.com
-Message-ID: <%d.%s@mail.example.com>
User-Agent: Horde Application Framework 4.0
-Date: %s, %d %s %d %d:%d:%d %s%d
Content-Type: text/plain; charset=iso-8859-15; format=flowed; DelSp=Yes
MIME-Version: 1.0
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
To: =?utf-8?b?w4RuZGVydW5n?= <other@example.com>
+Message-ID: <%d.%s@mail.example.com>
+Date: %s, %d %s %d %d:%d:%d %s%d
This is
the body
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
-echo $mail->send('dummy');
+echo $mail->send(array('type' => 'dummy'));
?>
--EXPECTF--