From e40fd31caf4bdab62381bfd1af1ea5c666fe5f47 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 20 Nov 2013 18:39:09 +0800 Subject: [PATCH] Tests/Mailer.php --- Tests/Mailer.php | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 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 -- 2.39.2