Skip to content
Browse files

some tuning

  • Loading branch information...
1 parent 8be939d commit 4e9e300bd35fabc2b6c037fb653020188196c597 @splitbrain committed Oct 19, 2012
Showing with 14 additions and 8 deletions.
  1. +10 −6 admin.php
  2. +3 −1 lang/en/intro.txt
  3. +1 −1 plugin.info.txt
View
16 admin.php
@@ -22,20 +22,24 @@ function getMenuSort() {
*/
function handle() {
global $INPUT;
+ global $conf;
if(!$INPUT->bool('send')) return;
- $mail = new Mailer();
+ // make sure debugging is on;
+ $conf['plugin']['swiftmail']['debug'] = 1;
+ // send a mail
+ $mail = new Mailer();
if($INPUT->str('to')) $mail->to($INPUT->str('to'));
if($INPUT->str('cc')) $mail->to($INPUT->str('cc'));
if($INPUT->str('bcc')) $mail->to($INPUT->str('bcc'));
-
- $mail->subject('SwiftMail Plugin say hello');
- $mail->setBody('This is a first test');
-
+ $mail->subject('SwiftMail Plugin says hello');
+ $mail->setBody("Hi @USER@\n\nThis is a test from @DOKUWIKIURL@");
$ok = $mail->send();
+
+ // check result
if($ok){
- msg('Message was sent. Swiftmail seem to work.',1);
+ msg('Message was sent. Swiftmail seems to work.',1);
}else{
msg('Message wasn\'t sent. Swiftmail seems not to work properly.',-1);
}
View
4 lang/en/intro.txt
@@ -1,3 +1,5 @@
====== SwiftMail Testing ======
-This page allows you to trigger sending a test mail in DokuWiki. You can use it to check if you configured the SwiftMail plugin correctly.
+This page allows you to trigger sending a test mail in DokuWiki. You can use it to check if you configured the SwiftMail plugin correctly.
+
+Give recipient's email addresses in the form below.
View
2 plugin.info.txt
@@ -1,7 +1,7 @@
base swiftmail
author Andreas Gohr
email andi@splitbrain.org
-date 2009-08-08
+date 2012-10-19
name SwiftMailer Plugin
desc Use SwiftMailer for sending mails from DokuWiki (uses SwiftMailer 3.3.3-php5)
url http://www.dokuwiki.org/plugin:swiftmail

0 comments on commit 4e9e300

Please sign in to comment.
Something went wrong with that request. Please try again.