fixed errors send email text-plain

This commit is contained in:
daniel 2017-04-26 12:00:08 +02:00
parent aa223aa583
commit bf2485ec25
2 changed files with 6 additions and 6 deletions

View File

@ -146,7 +146,7 @@ if (is_ajax ()) {
if (preg_match ("/^_html_editor_$/i", $field_value)) {
$editor_type_chkbx = "<div style=\"padding: 4px 0px;\"><b><small>";
$editor_type_chkbx .= __('Basic') . "&nbsp;&nbsp;";
$editor_type_chkbx .= __('Basic') . ui_print_help_tip (__("For sending emails, text must be HTML format, if you want to use plain text, type it between the following labels: <pre></pre>"), true);
$editor_type_chkbx .= html_print_radio_button_extended ('editor_type_value_'.$i, 0, '', false, false, "removeTinyMCE('textarea_field".$i."_value')", '', true);
$editor_type_chkbx .= "&nbsp;&nbsp;&nbsp;&nbsp;";
$editor_type_chkbx .= __('Advanced') . "&nbsp;&nbsp;";

View File

@ -1095,7 +1095,7 @@ sub pandora_execute_action ($$$$$$$$$;$) {
my $url ||= $pa_config->{"console_api_url"};
my $params = {};
$params->{"apipass"} ||= $pa_config->{"console_api_pass"};
$params->{"apipass"} = $pa_config->{"console_api_pass"};
$params->{"user"} ||= $pa_config->{"console_user"};
$params->{"pass"} ||= $pa_config->{"console_pass"};
$params->{"op"} = "get";
@ -1135,10 +1135,10 @@ sub pandora_execute_action ($$$$$$$$$;$) {
# Check if message has non-ascii chars.
# non-ascii chars should be encoded in UTF-8.
#if ($field3 =~ /[^[:ascii:]]/o) {
# $field3 = encode("UTF-8", $field3);
# $content_type = 'text/plain; charset="UTF-8"';
#}
if ($field3 =~ /[^[:ascii:]]/o) {
$field3 = encode("UTF-8", $field3);
$content_type = 'text/html; charset="UTF-8"';
}
# Build the mail with attached content
if (keys(%{$module_graph_list}) > 0) {