From: Alan Knowles Date: Wed, 20 Nov 2013 10:39:09 +0000 (+0800) Subject: Tests/Mailer.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=e40fd31caf4bdab62381bfd1af1ea5c666fe5f47 Tests/Mailer.php --- diff --git a/Tests/Mailer.php b/Tests/Mailer.php new file mode 100644 index 00000000..92ca18ff --- /dev/null +++ b/Tests/Mailer.php @@ -0,0 +1,63 @@ + array( + 'desc' => 'TO: email address', + // 'default' => '', + 'short' => 't', + 'min' => 1, + 'max' => 1, + + ) + ); + + function getAuth() + { + + if (!$this->bootLoader->cli) { + die("NOT PUBLIC"); + } + + } + + function get($q, $opts) + { + // send a test email to me... + $this->rcpts = $opts['to']; + $this->subject = "test email"; + + for($i = 0; $i < 10; $i++) { + $this->test[$i] = $i; + + } + require_once 'Pman/Core/Mailer.php'; + $r = new Pman_Core_Mailer(array( + 'template'=> 'test', + 'contents' => array(), + 'page' => $this, + 'attachments' => array( + array( + + 'file' => '/home/alan/Documents/Nestplaytimespjadcover.pdf', + + 'mimetype' => 'application/pdf' + + ) + ) + )); + return $r->send(); + + $this->sendTemplate('test',array()); + die("done?"); + + } + + + +} \ No newline at end of file