webform-mail.tpl.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. Always the Anonymous user
  15. * (uid 0) for confidential submissions.
  16. * - $ip_address: The IP address of the user submitting the form or '(unknown)'
  17. * for confidential submissions.
  18. *
  19. * The $email['email'] variable can be used to send different e-mails to
  20. * different users when using the "default" e-mail template.
  21. */
  22. ?>
  23. <?php print ($email['html'] ? '<p>' : '') . t('Submitted on [submission:date:long]') . ($email['html'] ? '</p>' : ''); ?>
  24. <?php if ($user->uid): ?>
  25. <?php print ($email['html'] ? '<p>' : '') . t('Submitted by user: [submission:user]') . ($email['html'] ? '</p>' : ''); ?>
  26. <?php else: ?>
  27. <?php print ($email['html'] ? '<p>' : '') . t('Submitted by anonymous user: [submission:ip-address]') . ($email['html'] ? '</p>' : ''); ?>
  28. <?php endif; ?>
  29. <?php print ($email['html'] ? '<p>' : '') . t('Submitted values are:') . ($email['html'] ? '</p>' : ''); ?>
  30. [submission:values]
  31. <?php print ($email['html'] ? '<p>' : '') . t('The results of this submission may be viewed at:') . ($email['html'] ? '</p>' : ''); ?>
  32. <?php print ($email['html'] ? '<p>' : ''); ?>[submission:url]<?php print ($email['html'] ? '</p>' : ''); ?>