<?php
+
/**
- * compose.php
- *
- * Copyright (c) 1999-2000 The SquirrelMail development team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
- * This code sends a mail.
- *
- * There are 4 modes of operation:
- * - Start new mail
- * - Add an attachment
- * - Send mail
- * - Save As Draft
- *
- * $Id$
+ ** compose.php
+ **
+ ** Copyright (c) 1999-2001 The SquirrelMail development team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** This code sends a mail.
+ **
+ ** There are 4 modes of operation:
+ ** - Start new mail
+ ** - Add an attachment
+ ** - Send mail
+ ** - Save As Draft
+ **
+ ** $Id$
**/
require_once('../src/validate.php');
// This code is for attachments
echo " <tr>\n";
- echo " <TD BGCOLOR=\"$color[0]\" VALIGN=TOP ALIGN=RIGHT>\n";
- echo " <SMALL><BR></SMALL>"._("Attach:");
+ echo " <TD BGCOLOR=\"$color[0]\" VALIGN=MIDDLE ALIGN=RIGHT>\n";
+ echo _("Attach:");
echo " </td><td ALIGN=left BGCOLOR=\"$color[0]\">\n";
echo " <INPUT NAME=\"attachfile\" SIZE=48 TYPE=\"file\">\n";
echo " <input type=\"submit\" name=\"attach\"";
echo "\n <INPUT TYPE=SUBMIT NAME=send VALUE=\"". _("Send") . "\">\n";
if ($save_as_draft) {
- echo "<input type=\"submit\" name =\"draft\" value=\"Save Draft\">\n";
+ echo '<input type="submit" name ="draft" value="' . _("Save Draft") . "\">\n";
}
if ($default_use_priority) {
if(!isset($mailprio)) {
$attachments[] = $newAttachment;
}
- if (!isset($mailbox) || $mailbox == "" || ($mailbox == "None"))
+ if (!isset($mailbox) || $mailbox == '' || ($mailbox == 'None'))
$mailbox = "INBOX";
if (isset($draft)) {
do_hook("compose_send");
- if (!sendMessage($send_to, $send_to_cc, $send_to_bcc, $subject, $body, $reply_id, $mailprio)) {
+ if (! isset($mailprio))
+ $Result = sendMessage($send_to, $send_to_cc, $send_to_bcc,
+ $subject, $body, $reply_id);
+ else
+ $Result = sendMessage($send_to, $send_to_cc, $send_to_bcc,
+ $subject, $body, $reply_id, $mailprio);
+ if (! $Result) {
showInputForm();
exit();
}