Beispiel #1
0
    }
    if (isset($_POST['t_use_email_addr']) && $_POST['t_use_email_addr'] == 'Y') {
        $use_email_addr = true;
    } else {
        $use_email_addr = false;
    }
    if (!user_allow_email($to_user['UID'])) {
        $error_msg_array[] = sprintf(gettext("%s has opted out of email contact"), word_filter_add_ob_tags(format_user_name($to_user['LOGON'], $to_user['NICKNAME']), true));
        $valid = false;
    }
    if (!email_address_valid($to_user['EMAIL'])) {
        $error_msg_array[] = sprintf(gettext("%s has an invalid email address"), word_filter_add_ob_tags(format_user_name($to_user['LOGON'], $to_user['NICKNAME']), true));
        $valid = false;
    }
    if ($valid) {
        if (email_send_message_to_user($to_uid, $uid, $subject, $message, $use_email_addr)) {
            html_draw_top(sprintf('title=%s', gettext("Email result")), 'pm_popup_disabled', 'class=window_title');
            html_display_msg(gettext("Message sent"), gettext("Message sent successfully."), 'email.php', 'post', array('close' => gettext("Close")), array('to_uid' => $to_uid), false, 'center');
            html_draw_bottom();
            exit;
        } else {
            html_draw_error(gettext("Mail system failure. Message not sent."));
            exit;
        }
    }
}
html_draw_top(sprintf('title=%s', sprintf(gettext("Send Email to %s"), htmlentities_array(format_user_name($to_user['LOGON'], $to_user['NICKNAME'])))), 'pm_popup_disabled', 'class=window_title');
echo "<h1>", sprintf(gettext("Send Email to %s"), htmlentities_array(format_user_name($to_user['LOGON'], $to_user['NICKNAME']))), "</h1>\n";
echo "<br />";
echo "<div align=\"center\">\n";
echo "<form accept-charset=\"utf-8\" name=\"f_email\" action=\"email.php\" method=\"post\">\n";
Beispiel #2
0
    }
    if (isset($_POST['t_use_email_addr']) && $_POST['t_use_email_addr'] == 'Y') {
        $use_email_addr = true;
    } else {
        $use_email_addr = false;
    }
    if (!user_allow_email($to_user['UID'])) {
        $error_msg_array[] = sprintf(gettext("%s has opted out of email contact"), word_filter_add_ob_tags(format_user_name($to_user['LOGON'], $to_user['NICKNAME']), true));
        $valid = false;
    }
    if (!email_address_valid($to_user['EMAIL'])) {
        $error_msg_array[] = sprintf(gettext("%s has an invalid email address"), word_filter_add_ob_tags(format_user_name($to_user['LOGON'], $to_user['NICKNAME']), true));
        $valid = false;
    }
    if ($valid) {
        if (email_send_message_to_user($to_uid, $_SESSION['UID'], $subject, $message, $use_email_addr)) {
            html_draw_top(array('title' => gettext('Email result'), 'pm_popup_disabled' => true, 'class' => 'window_title'));
            html_display_msg(gettext("Message sent"), gettext("Message sent successfully."), 'email.php', 'post', array('close' => gettext("Close")), array('to_uid' => $to_uid), '_self', 'center');
            html_draw_bottom();
            exit;
        } else {
            html_draw_error(gettext("Mail system failure. Message not sent."));
            exit;
        }
    }
}
html_draw_top(array('title' => sprintf(gettext('Send Email to %s'), htmlentities_array(format_user_name($to_user['LOGON'], $to_user['NICKNAME']))), 'pm_popup_disabled' => true, 'class' => 'window_title'));
echo "<h1>", sprintf(gettext("Send Email to %s"), htmlentities_array(format_user_name($to_user['LOGON'], $to_user['NICKNAME']))), "</h1>\n";
echo "<br />";
echo "<div align=\"center\">\n";
echo "<form accept-charset=\"utf-8\" name=\"f_email\" action=\"email.php\" method=\"post\">\n";