summaryrefslogtreecommitdiffstats
path: root/drupal_mail_test.php
diff options
context:
space:
mode:
authorKyle Kaminski <kyle@xenomedia.com>2014-07-17 16:03:41 -0500
committerKyle Kaminski <kyle@xenomedia.com>2014-07-17 16:03:41 -0500
commitad84363810fa5cd1a72b54d7cb1658571183d01e (patch)
tree9d2eab87a24ca559d84b971e5bcf6cc16eb34772 /drupal_mail_test.php
parente4d376db088d296dfb34b58e8b557c38107b17c8 (diff)
downloaddrupal-quest-master.tar.gz
drupal-quest-master.tar.bz2
drupal-quest-master.zip
drupal_mail testHEADmaster
Diffstat (limited to 'drupal_mail_test.php')
-rw-r--r--drupal_mail_test.php26
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