webform-mail.tpl.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * @file
  4. * Customize the e-mails sent by Webform after successful submission.
  5. *
  6. * This file may be renamed "webform-mail-[nid].tpl.php" to target a
  7. * specific webform e-mail on your site. Or you can leave it
  8. * "webform-mail.tpl.php" to affect all webform e-mails on your site.
  9. *
  10. * Available variables:
  11. * - $node: The node object for this webform.
  12. * - $submission: The webform submission.
  13. * - $email: The entire e-mail configuration settings.
  14. * - $user: The current user submitting the form.
  15. * - $ip_address: The IP address of the user submitting the form.
  16. *
  17. * The $email['email'] variable can be used to send different e-mails to different users
  18. * when using the "default" e-mail template.
  19. */
  20. ?>
  21. <?php print ($email['html'] ? '<p>' : '') . t('Submitted on %date'). ($email['html'] ? '</p>' : ''); ?>
  22. <?php if ($user->uid): ?>
  23. <?php print ($email['html'] ? '<p>' : '') . t('Submitted by user: %username') . ($email['html'] ? '</p>' : ''); ?>
  24. <?php else: ?>
  25. <?php print ($email['html'] ? '<p>' : '') . t('Submitted by anonymous user: [%ip_address]') . ($email['html'] ? '</p>' : ''); ?>
  26. <?php endif; ?>
  27. <?php print ($email['html'] ? '<p>' : '') . t('Submitted values are') . ':' . ($email['html'] ? '</p>' : ''); ?>
  28. %email_values
  29. <?php print ($email['html'] ? '<p>' : '') . t('The results of this submission may be viewed at:') . ($email['html'] ? '</p>' : '') ?>
  30. <?php print ($email['html'] ? '<p>' : ''); ?>%submission_url<?php print ($email['html'] ? '</p>' : ''); ?>