summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2013-10-12 13:30:54 +0200
committerAndreas Gohr <andi@splitbrain.org>2013-10-12 13:30:54 +0200
commitd6e04b603a81d6c55c3bb71974689892762b6a01 (patch)
treeb093a57b0cd2ad05153eddeb314beab156e3d7a5 /_test
parent0ee5ed1e998c1e67c4a0b7687977c4e2e0f29494 (diff)
downloadrpg-d6e04b603a81d6c55c3bb71974689892762b6a01.tar.gz
rpg-d6e04b603a81d6c55c3bb71974689892762b6a01.tar.bz2
successfully validate Mailer mails with msglint
Diffstat (limited to '_test')
-rw-r--r--_test/tests/inc/mailer.test.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/_test/tests/inc/mailer.test.php b/_test/tests/inc/mailer.test.php
index fefb6f508..feb454fcf 100644
--- a/_test/tests/inc/mailer.test.php
+++ b/_test/tests/inc/mailer.test.php
@@ -164,6 +164,7 @@ class mailer_test extends DokuWikiTest {
// prepare a simple multipart message
$mail = new TestMailer();
$mail->to(array('Möp <moep@example.com> ',' foo <foo@example.com>'));
+ $mail->from('Me <test@example.com>');
$mail->subject('This is a töst');
$mail->setBody('Hello Wörld,
@@ -173,6 +174,8 @@ class mailer_test extends DokuWikiTest {
$msg = $mail->dump();
$msglines = explode("\n", $msg);
+ //echo $msg;
+
// ask message lint if it is okay
$html = new HTTPClient();
$results = $html->post('http://tools.ietf.org/tools/msglint/msglint', array('msg'=>$msg));
@@ -195,6 +198,10 @@ class mailer_test extends DokuWikiTest {
// check the line for errors
if(substr($line,0,5) == 'ERROR'){
+ // ignore some errors
+ if(strpos($line, "missing mandatory header 'return-path'")) continue; #set by MDA
+ if(strpos($line, "bare newline in text body decoded")) continue; #seems to be false positive
+
// get the context in which the error occured
$errorin = '';
if(preg_match('/line (\d+)$/', $line, $m)){