Source for file mailout.php

Documentation is available at mailout.php

  1. <?php
  2. /**
  3.  * mailout.php
  4.  *
  5.  * Copyright (c) 1999-2020 The SquirrelMail Project Team
  6.  * Licensed under the GNU GPL. For full terms see the file COPYING.
  7.  *
  8.  * $Id: mailout.php 14840 2020-01-07 07:42:38Z pdontthink $
  9.  * @package plugins
  10.  * @subpackage listcommands
  11.  */
  12.  
  13. define('SM_PATH','../../');
  14.  
  15. /* SquirrelMail required files. */
  16. require_once(SM_PATH 'include/validate.php');
  17. include_once(SM_PATH 'functions/page_header.php');
  18. include_once(SM_PATH 'include/load_prefs.php');
  19. include_once(SM_PATH 'functions/html.php');
  20. require_once(SM_PATH 'functions/identity.php');
  21.  
  22. displayPageHeader($colornull);
  23.  
  24. /* get globals */
  25. sqgetGlobalVar('mailbox'$mailboxSQ_GET);
  26. sqgetGlobalVar('send_to'$send_toSQ_GET);
  27. sqgetGlobalVar('subject'$subjectSQ_GET);
  28. sqgetGlobalVar('body',    $body,    SQ_GET);
  29. sqgetGlobalVar('action',  $action,  SQ_GET);
  30. sqgetGlobalVar('identity',  $identity,  SQ_GET);
  31.  
  32. switch $action {
  33. case 'help':
  34.     $out_string _("This will send a message to %s requesting help for this list. You will receive an emailed response at the address below.");
  35.     break;
  36. case 'subscribe':
  37.     $out_string _("This will send a message to %s requesting that you will be subscribed to this list. You will be subscribed with the address below.");
  38.     break;
  39. case 'unsubscribe':
  40.     $out_string _("This will send a message to %s requesting that you will be unsubscribed from this list. It will try to unsubscribe the adress below.");
  41.     break;
  42. default:
  43.     error_box(sprintf(_("Unknown action: %s"),sm_encode_html_special_chars($action))$color);
  44.     exit;
  45. }
  46.  
  47. echo html_tag('p''''left' .
  48. html_tag'table''''center'$color[0]'border="0" width="75%"' "\n" .
  49.     html_tag'tr',
  50.         html_tag'th'_("Mailinglist"' ' _($action)''$color[9)
  51.     .
  52.     html_tag'tr' .
  53.     html_tag'td''''left' );
  54.  
  55.  
  56. printf$out_stringsm_encode_html_special_chars($send_to) );
  57.  
  58. echo '<form method="post" action="../../src/compose.php">'.
  59.      '<input type="hidden" name="smtoken" value="' sm_generate_security_token('" />';
  60.  
  61. $idents get_identities();
  62.  
  63. echo html_tag('p''''center' _("From:"' ';
  64.  
  65. if (count($idents1{
  66.     echo '<select name="identity">';
  67.     foreach($idents as $nr=>$data{
  68.         echo '<option '
  69.            . ($identity == $nr ' selected="selected" ' '')
  70.            . 'value="' $nr '">'
  71.            . sm_encode_html_special_chars(
  72.                 $data['full_name'].' <'.
  73.                 $data['email_address'">\n");
  74.     }
  75.     echo '</select>' "\n" ;
  76. else {
  77.     echo sm_encode_html_special_chars('"'.$idents[0]['full_name'].'" <'.$idents[0]['email_address'].'>');
  78. }
  79.  
  80. echo '<br /><br />'
  81. '<input type="hidden" name="send_to" value="' sm_encode_html_special_chars($send_to'">'
  82. '<input type="hidden" name="subject" value="' sm_encode_html_special_chars($subject'">'
  83. '<input type="hidden" name="body" value="' sm_encode_html_special_chars($body'">'
  84. '<input type="hidden" name="mailbox" value="' sm_encode_html_special_chars($mailbox'">'
  85. '<input type="submit" name="send" value="' _("Send Mail"'"><br /><br />'
  86. '</form></td></tr></table></body></html>';

Documentation generated on Mon, 13 Jan 2020 04:24:55 +0100 by phpDocumentor 1.4.3