diff options
Diffstat (limited to 'drupal_mail_test.php')
-rw-r--r-- | drupal_mail_test.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drupal_mail_test.php b/drupal_mail_test.php new file mode 100644 index 0000000..8c9725f --- /dev/null +++ b/drupal_mail_test.php @@ -0,0 +1,26 @@ +<?php + // for now copy/paste this into devel's module 'Execute PHP Code' page + $my_module = 'no_module'; + $my_mail_token = 'no_token'; + $from = variable_get('site_mail', ini_get('sendmail_from')); + $to = 'kyle@xenomedia.com'; + $message = array( + 'id' => $my_module . '_' . $my_mail_token, + 'to' => $to, + 'subject' => 'test', + 'body' => 'test', + 'headers' => array( + 'From' => $from, + 'Sender' => $from, + 'Return-Path' => $from, + ), + ); + $system = drupal_mail_system('no_module', $my_mail_token); + if ($system->mail($message)) { + dpm('ok'); + } + else { + dpm('error'); + } + +?>
\ No newline at end of file |