int emcore_mime_flush_receiving_buffer(void *stream, int is_file, char *boundary_string, char *boundary_end_string, int *end_of_parsing, int *err_code)
{
EM_DEBUG_FUNC_BEGIN("stream[%p], is_file[%d], boundary_string[%s], boundary_end_string[%s], end_of_parsing[%p], err_code[%p]", stream, is_file, boundary_string, boundary_end_string, end_of_parsing, err_code);
- char buf[MIME_LINE_LEN] = {0, };
+ int err = EMAIL_ERROR_NONE;
int local_end_of_parsing = 0;
+ char buf[MIME_LINE_LEN] = {0, };
if (!stream) {
+ EM_DEBUG_EXCEPTION("EMAIL_ERROR_INVALID_PARAM");
if (err_code)
*err_code = EMAIL_ERROR_INVALID_PARAM;
- EM_DEBUG_EXCEPTION("EMAIL_ERROR_INVALID_PARAM");
return false;
}
while (TRUE) {
- if (!emcore_check_thread_status()) {
- if (err_code != NULL)
- *err_code = EMAIL_ERROR_CANCELLED;
+ if (!emcore_check_thread_status()) {
EM_DEBUG_FUNC_END("EMAIL_ERROR_CANCELLED");
+ if (err_code)
+ *err_code = EMAIL_ERROR_CANCELLED;
return false;
}
- if ((is_file == 0 && !emcore_mime_get_line_from_sock(stream, buf, MIME_LINE_LEN, err_code)) ||
- (is_file == 1 && !emcore_get_line_from_file(stream, buf, MIME_LINE_LEN, err_code))) {
- EM_DEBUG_EXCEPTION("emcore_mime_get_line_from_sock failed");
- local_end_of_parsing = 0;
+ if ((is_file == 0 && !emcore_mime_get_line_from_sock(stream, buf, MIME_LINE_LEN, &err)) ||
+ (is_file == 1 && !emcore_get_line_from_file(stream, buf, MIME_LINE_LEN, &err))) {
+ if (err != EMAIL_ERROR_NO_MORE_DATA) {
+ EM_DEBUG_EXCEPTION("file : [%d], emcore_mime_get_line_from_sock or emcore_mime_get_line_from_file failed", is_file);
+ local_end_of_parsing = 0;
+ break;
+ }
+
+ local_end_of_parsing = 1;
break;
}
if (end_of_parsing)
*end_of_parsing = local_end_of_parsing;
+ if (err_code)
+ *err_code = err;
+
EM_DEBUG_FUNC_END();
return true;
}
{
EM_DEBUG_FUNC_BEGIN("stream[%p], is_file[%d], mmsg[%p], cnt_info[%p], callback[%p], err_code[%p]", stream, is_file, mmsg, cnt_info, callback, err_code);
+ if (!mmsg->header) {
+ EM_DEBUG_EXCEPTION("Invalid paramter");
+ *err_code = EMAIL_ERROR_INVALID_PARAM;
+ return false;
+ }
+
char *content_type = NULL, *content_encoding = NULL, *holder = NULL, *attachment_name, *t = NULL;
- int type = 0, end_of_parsing = 0, size, local_err_code = EMAIL_ERROR_NONE;
+ int type = 0, end_of_parsing = 0, size;
+ int err = EMAIL_ERROR_NONE;
if (!emcore_check_thread_status()) {
if (err_code != NULL)
switch (type) {
case TYPE_MULTIPART:
- if (mmsg->header && !emcore_mime_get_header_value(mmsg->header->part_header, CONTENT_BOUNDARY, err_code)) {
+ if (mmsg->header && !emcore_mime_get_header_value(mmsg->header->part_header, CONTENT_BOUNDARY, &err)) {
EM_DEBUG_FUNC_END("false");
+ if (err_code != NULL)
+ *err_code = err;
return false;
}
- if (mmsg->header && !emcore_mime_parse_part(stream, is_file, mmsg->header->part_header, &mmsg->nested, cnt_info, &end_of_parsing, &local_err_code)) {
+ if (mmsg->header && !emcore_mime_parse_part(stream, is_file, mmsg->header->part_header, &mmsg->nested, cnt_info, &end_of_parsing, &err)) {
EM_DEBUG_FUNC_END("false");
+ if (err_code != NULL)
+ *err_code = err;
return false;
}
/* after finishing body parsing, make stream empty to get next mail. (get line from sock or file until '.' is read */
- if (end_of_parsing == true && local_err_code != EMAIL_ERROR_NO_MORE_DATA)
+ if (end_of_parsing == true && err != EMAIL_ERROR_NO_MORE_DATA)
emcore_mime_flush_receiving_buffer(stream, is_file, NULL, NULL, NULL, err_code);
- if (err_code)
- *err_code = local_err_code;
-
break;
default:
EM_DEBUG_LOG("After emcore_mime_get_content_data");
char *charset = mmsg->header? emcore_mime_get_header_value(mmsg->header->part_header, CONTENT_CHARSET, err_code) : NULL; /* prevent 27453 */
-
EM_DEBUG_LOG(">>>> charset [%s]", charset);
if (mmsg->header && mmsg->header->part_header && strstr((t = emcore_mime_get_header_value(mmsg->header->part_header, CONTENT_TYPE, err_code)) ? t : "", "HTML")) {
if (!charset || !strncmp(charset, "X-UNKNOWN", strlen("X-UNKNOWN")))
- cnt_info->text.plain_charset = strdup("UTF-8");
+ cnt_info->text.html_charset = strdup("UTF-8");
else
- cnt_info->text.plain_charset = EM_SAFE_STRDUP(charset);
-
- EM_DEBUG_LOG(">>>> cnt_info->text.plain_charset [%s]", cnt_info->text.plain_charset);
+ cnt_info->text.html_charset = EM_SAFE_STRDUP(charset);
+ EM_DEBUG_LOG(">>>> cnt_info->text.html_charset [%s]", cnt_info->text.html_charset);
cnt_info->text.html = holder;
-
- EM_DEBUG_LOG(">>>> cnt_info->text.plain [%s]", cnt_info->text.html);
-
+ EM_DEBUG_LOG(">>>> cnt_info->text.html [%s]", cnt_info->text.html);
}
else if (mmsg->header) {
cnt_info->text.plain_charset = strdup("UTF-8");
else
cnt_info->text.plain_charset = EM_SAFE_STRDUP(charset);
-
EM_DEBUG_LOG(">>>> cnt_info->text.plain_charset [%s]", cnt_info->text.plain_charset);
cnt_info->text.plain = holder;
-
EM_DEBUG_LOG(">>>> cnt_info->text.plain [%s]", cnt_info->text.plain);
}
}
char *holder = NULL;
char *attachment_name = NULL;
char *content_disposition = NULL;
- char *t = NULL;
char *pTemp = NULL;
int type = 0;
int content_disposition_type = 0;
/* first check inline content */
/* if the content id or content location exis */
- t = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_TYPE, err_code);
- EM_DEBUG_LOG("content_type : [%s]", t);
+ content_disposition = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_DISPOSITION, err_code);
+ EM_DEBUG_LOG("content_disposition : [%s]", content_disposition);
- if (!strstr(t ? t : "", "HTML")) {
- content_disposition = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_DISPOSITION, err_code);
- EM_DEBUG_LOG("content_disposition : [%s]", content_disposition);
+ attachment_name = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_ID, err_code);
+ EM_DEBUG_LOG("content_id : [%s]", attachment_name);
- attachment_name = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_ID, err_code);
- EM_DEBUG_LOG("content_id : [%s]", attachment_name);
+ if (attachment_name) {
+ if (emcore_search_string_from_file(cnt_info->text.html, attachment_name, &result) == EMAIL_ERROR_NONE && result) {
+ content_disposition_type = INLINE_ATTACHMENT;
+ } else if (!strcasecmp(content_disposition ? content_disposition : "", "attachment")) {
+ attachment_name = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_NAME, err_code);
- if (attachment_name) {
- if (emcore_search_string_from_file(cnt_info->text.html, attachment_name, &result) == EMAIL_ERROR_NONE && result) {
- content_disposition_type = INLINE_ATTACHMENT;
- } else if (!strcasecmp(content_disposition ? content_disposition : "", "attachment")) {
- attachment_name = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_NAME, err_code);
+ if (!attachment_name)
+ attachment_name = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_FILENAME, err_code);
- if (!attachment_name)
- attachment_name = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_FILENAME, err_code);
+ content_disposition_type = ATTACHMENT;
- content_disposition_type = ATTACHMENT;
-
- } else {
- EM_DEBUG_EXCEPTION("Unknown mime type");
- }
} else {
- if (!strcasecmp(content_disposition ? content_disposition : "", "attachment")) {
- attachment_name = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_NAME, err_code);
-
- if (!attachment_name)
- attachment_name = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_FILENAME, err_code);
+ EM_DEBUG_EXCEPTION("Unknown mime type");
+ }
+ } else {
+ if (!strcasecmp(content_disposition ? content_disposition : "", "attachment")) {
+ attachment_name = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_NAME, err_code);
- content_disposition_type = ATTACHMENT;
+ if (!attachment_name)
+ attachment_name = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_FILENAME, err_code);
- } else if (!strcasecmp(content_disposition ? content_disposition : "", "inline")) {
- attachment_name = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_NAME, err_code);
+ content_disposition_type = ATTACHMENT;
- if (!attachment_name)
- attachment_name = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_FILENAME, err_code);
+ } else if (!strcasecmp(content_disposition ? content_disposition : "", "inline")) {
+ attachment_name = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_NAME, err_code);
- content_disposition_type = INLINE_ATTACHMENT;
- } else if (strstr(content_type, "PKCS7")) {
- attachment_name = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_NAME, err_code);
- EM_DEBUG_LOG_MIME(">> attachment = [%s]", attachment_name ? attachment_name : NIL);
+ if (!attachment_name)
+ attachment_name = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_FILENAME, err_code);
- content_disposition_type = ATTACHMENT;
+ content_disposition_type = INLINE_ATTACHMENT;
+ } else if (strstr(content_type ? content_type : "", "PKCS7")) {
+ attachment_name = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_NAME, err_code);
+ EM_DEBUG_LOG_MIME(">> attachment = [%s]", attachment_name ? attachment_name : NIL);
- } else {
- EM_DEBUG_EXCEPTION("Unknown mime");
- }
+ content_disposition_type = ATTACHMENT;
+ } else {
+ EM_DEBUG_LOG("No attachment");
}
}
EM_DEBUG_LOG("After emcore_mime_get_content_data");
- if (cnt_info->grab_type & GRAB_TYPE_TEXT) {
- if (tmp_body->part_header && strstr(t ? t : "", "HTML")) {
- cnt_info->text.html = holder;
+ if (cnt_info->grab_type & GRAB_TYPE_TEXT) {
+ char *charset = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_CHARSET, err_code);
+ EM_DEBUG_LOG(" charset [%s]", charset);
- EM_DEBUG_LOG(" cnt_info->text.html [%s]", cnt_info->text.html);
- }
- else {
- char *charset = emcore_mime_get_header_value(tmp_body->part_header, CONTENT_CHARSET, err_code);
- EM_DEBUG_LOG(" charset [%s]", charset);
+ if (tmp_body->part_header && strstr(content_type ? content_type : "", "HTML")) {
+ if (!charset || !strncmp(charset, "X-UNKNOWN", strlen("X-UNKNOWN")))
+ cnt_info->text.html_charset = strdup("UTF-8");
+ else
+ cnt_info->text.html_charset = EM_SAFE_STRDUP(charset);
+ EM_DEBUG_LOG(" cnt_info->text.html_charset [%s]", cnt_info->text.html_charset);
+ cnt_info->text.html = holder;
+ EM_DEBUG_LOG(" cnt_info->text.html [%s]", cnt_info->text.html);
+ } else {
if (!charset || !strncmp(charset, "X-UNKNOWN", strlen("X-UNKNOWN")))
cnt_info->text.plain_charset = strdup("UTF-8");
else
cnt_info->text.plain_charset = EM_SAFE_STRDUP(charset);
-
EM_DEBUG_LOG(" cnt_info->text.plain_charset [%s]", cnt_info->text.plain_charset);
cnt_info->text.plain = holder;
-
EM_DEBUG_LOG(" cnt_info->text.plain [%s]", cnt_info->text.plain);
}
- }
- else {
- if (holder) {
+ } else {
+ if (holder) {
free(holder);
holder = NULL;
}
}
- }
- else { /* attachment */
+ } else { /* attachment */
EM_DEBUG_LOG("attachment_name is not NULL. It's a attachment");
struct attachment_info *file = NULL;
struct attachment_info *temp_file = cnt_info->file;
if (is_file) {
EM_DEBUG_LOG("from file");
- error = emcore_decode_body_text_from_file((FILE *)stream, boundary_str, encoding, mode, is_text, fd, holder, end_of_parsing, size);
+ error = emcore_decode_body_text_from_file((FILE *)stream, boundary_str, encoding, mode, is_text, fd, holder, end_of_parsing, &sz);
if (error != EMAIL_ERROR_NONE) {
if (error != EMAIL_ERROR_NO_MORE_DATA) {
EM_DEBUG_EXCEPTION("emcore_decode_body_text_from_file failed : [%d]", error);
char *filename = NULL;
int server_response_yn = 0;
int write_flag = false;
- char *write_buffer = NULL;
unsigned char encoded[DOWNLOAD_MAX_BUFFER_SIZE] = {0, };
unsigned char test_buffer[LOCAL_MAX_BUFFER_SIZE] = {0, };
int flag_first_write = true;
- int max_write_buffer_size = MAX_WRITE_BUFFER_SIZE;
if (!stream || !filepath || !section) {
EM_DEBUG_EXCEPTION("stream[%p], filepath[%s], uid[%d], section[%s], encoding[%d], decoded_total[%p]", stream, filepath, uid, section, encoding, decoded_total);
goto FINISH_OFF;
}
- EM_DEBUG_LOG(">>> WRITE BUFFER SIZE : %d KB", max_write_buffer_size);
-
- if (max_write_buffer_size > 0) {
- max_write_buffer_size *= 1024; /* KB -> byte */
- if (!(write_buffer = em_malloc(sizeof(char) *max_write_buffer_size))) {
- EM_DEBUG_EXCEPTION("em_malloc failed...");
- err = EMAIL_ERROR_OUT_OF_MEMORY;
- goto FINISH_OFF;
- }
- }
-
FINISH_OFF_IF_CANCELED;
if (!(fp = fopen(filepath, "wb+"))) {
if (fp != NULL)
fclose(fp);
- EM_SAFE_FREE(write_buffer);
-
if (ret == false) { /* delete temp fil */
struct stat temp_file_stat;
if (filepath && stat(filepath, &temp_file_stat) == 0)
_imap4_received_body_size -= gap;
_imap4_last_notified_body_size = _imap4_received_body_size;
- if (body_size)
- progress = 100*total/body_size;
- else
- progress = body_size;
+ progress = 100*total/body_size; /*prevent 40023*/
EM_DEBUG_LOG("DOWNLOADING STATUS NOTIFY : Encoded[%d] / [%d] = %d %% Completed. -- Total Decoded[%d]", total, body_size, progress, total);
EM_DEBUG_LOG("DOWNLOADING STATUS NOTIFY : Total[%d] / [%d] = %d %% Completed.", _imap4_received_body_size, _imap4_total_body_size, imap4_total_body_download_progress);
goto FINISH_OFF;
}
- if (cnt_info->text.plain_charset != NULL) {
- SNPRINTF(html_body, MAX_PATH, "%s%s", cnt_info->text.plain_charset, HTML_EXTENSION_STRING);
- }
- else {
+ if (cnt_info->text.html_charset != NULL) {
+ SNPRINTF(html_body, MAX_PATH, "%s%s", cnt_info->text.html_charset, HTML_EXTENSION_STRING);
+ } else {
strcpy(html_body, UNKNOWN_CHARSET_HTML_TEXT_FILE);
}
-
if (!emstorage_get_save_name(EML_FOLDER, eml_mail_id, 0, html_body, buf, &err)) {
EM_DEBUG_EXCEPTION("emstorage_get_save_name failed [%d]", err);
goto FINISH_OFF;
{
EM_DEBUG_FUNC_BEGIN();
int error = EMAIL_ERROR_NONE;
- int start_location = 0;
- int end_location = 0;
int p_size = 0;
int partial_body = 0;
int dec_len = 0;
+ long start_location = 0;
+ long end_location = 0;
char boundary[BOUNDARY_LEN] = {0x00, };
char boundary_end[BOUNDARY_LEN] = {0x00, };
char buf[MIME_LINE_LEN] = {0x00, };
}
if (modified_body == NULL) {
- modified_body = strdup(body); /*prevent 35585 */
+ modified_body = em_malloc(dec_len + 1);
+ if (modified_body == NULL) {
+ EM_DEBUG_EXCEPTION("em_malloc failed");
+ error = EMAIL_ERROR_OUT_OF_MEMORY;
+ goto FINISH_OFF;
+ }
+
+ memcpy(modified_body, body, dec_len); /*prevent 35585 */
modified_body_size = dec_len;
}
FINISH_OFF:
+ if (size)
+ *size = modified_body_size;
+
EM_SAFE_FREE(modified_body);
EM_SAFE_FREE(body); /*prevent 35585 */
return error;
if (mail_data->preview_text == NULL) {
if ( (err = emcore_get_preview_text_from_file(mail_data->file_path_plain, mail_data->file_path_html, MAX_PREVIEW_TEXT_LENGTH, &(mail_data->preview_text))) != EMAIL_ERROR_NONE) {
EM_DEBUG_EXCEPTION("emcore_get_preview_text_from_file failed[%d]", err);
- goto FINISH_OFF;
+
+ if (err != EMAIL_ERROR_EMPTY_FILE)
+ goto FINISH_OFF;
}
}
}
/* get mail to send */
- if ( !emstorage_get_mail_by_id(mail_id, &mail_tbl_data, false, &err) || err != EMAIL_ERROR_NONE) {
+ if (!emstorage_get_mail_by_id(mail_id, &mail_tbl_data, false, &err) || err != EMAIL_ERROR_NONE) {
EM_DEBUG_EXCEPTION("emstorage_get_mail_by_id failed [%d]", err);
goto FINISH_OFF;
}
- if ( (err = emstorage_get_attachment_list(mail_id, false, &attachment_tbl_data, &attachment_tbl_count)) != EMAIL_ERROR_NONE) {
+ if ((err = emstorage_get_attachment_list(mail_id, false, &attachment_tbl_data, &attachment_tbl_count)) != EMAIL_ERROR_NONE) {
EM_DEBUG_EXCEPTION("emstorage_get_attachment_list failed [%d]", err);
goto FINISH_OFF;
}
goto FINISH_OFF;
}
else {
- if ( (err = em_verify_email_address_of_mail_tbl(mail_tbl_data, false)) != EMAIL_ERROR_NONE ) {
+ if ((err = em_verify_email_address_of_mail_tbl(mail_tbl_data, false)) != EMAIL_ERROR_NONE) {
err = EMAIL_ERROR_INVALID_ADDRESS;
EM_DEBUG_EXCEPTION("em_verify_email_address_of_mail_tbl failed [%d]", err);
goto FINISH_OFF;
/*Update status flag to DB*/
/* get rfc822 data */
- if (!emcore_make_rfc822_file_from_mail(mail_tbl_data, attachment_tbl_data, attachment_tbl_count, &envelope, &fpath, opt, &err)) {
+ if (!emcore_make_rfc822_file_from_mail(mail_tbl_data, attachment_tbl_data, attachment_tbl_count, &envelope, &fpath, opt, &err)) {
EM_DEBUG_EXCEPTION("emcore_make_rfc822_file_from_mail failed [%d]", err);
goto FINISH_OFF;
}
envelope->from = rfc822_parse_mailbox(&p, NULL);
EM_SAFE_FREE(p);
- if (!envelope->from) {
+ if (!envelope->from) {
EM_DEBUG_EXCEPTION("rfc822_parse_mailbox failed...");
error = EMAIL_ERROR_INVALID_ADDRESS;
goto FINISH_OFF;
root_body->size.bytes = 0;
root_body->parameter = param;
- if (input_mail_tbl_data->smime_type == EMAIL_SMIME_NONE) {
+ if (input_mail_tbl_data->smime_type == EMAIL_SMIME_NONE && input_mail_tbl_data->file_path_plain && input_mail_tbl_data->file_path_html) {
part_for_text = attach_mutipart_with_sub_type(root_body, "ALTERNATIVE", &error);
if (!part_for_text) {
}
text_body = &part_for_text->body;
- }
- if (input_mail_tbl_data->file_path_plain && EM_SAFE_STRLEN(input_mail_tbl_data->file_path_plain) > 0) {
- EM_DEBUG_LOG("file_path_plain[%s]", input_mail_tbl_data->file_path_plain);
- if (!attach_part(text_body, (unsigned char *)input_mail_tbl_data->file_path_plain, 0, NULL, NULL, false, &error)) {
- EM_DEBUG_EXCEPTION("attach_part failed [%d]", error);
- goto FINISH_OFF;
+ if (input_mail_tbl_data->file_path_plain && EM_SAFE_STRLEN(input_mail_tbl_data->file_path_plain) > 0) {
+ EM_DEBUG_LOG("file_path_plain[%s]", input_mail_tbl_data->file_path_plain);
+ if (!attach_part(text_body, (unsigned char *)input_mail_tbl_data->file_path_plain, 0, NULL, NULL, false, &error)) {
+ EM_DEBUG_EXCEPTION("attach_part failed [%d]", error);
+ goto FINISH_OFF;
+ }
}
- }
- if (input_mail_tbl_data->file_path_html && EM_SAFE_STRLEN(input_mail_tbl_data->file_path_html) > 0) {
- EM_DEBUG_LOG("file_path_html[%s]", input_mail_tbl_data->file_path_html);
+ if (input_mail_tbl_data->file_path_html && EM_SAFE_STRLEN(input_mail_tbl_data->file_path_html) > 0) {
+ EM_DEBUG_LOG("file_path_html[%s]", input_mail_tbl_data->file_path_html);
- part_for_html = attach_mutipart_with_sub_type(text_body, "RELATED", &error);
- if (!part_for_html) {
- EM_DEBUG_EXCEPTION("attach_mutipart_with_sub_type [part_for_html] failed [%d]", error);
- goto FINISH_OFF;
- }
+ part_for_html = attach_mutipart_with_sub_type(text_body, "RELATED", &error);
+ if (!part_for_html) {
+ EM_DEBUG_EXCEPTION("attach_mutipart_with_sub_type [part_for_html] failed [%d]", error);
+ goto FINISH_OFF;
+ }
- if (!attach_part(&(part_for_html->body) , (unsigned char *)input_mail_tbl_data->file_path_html, 0, NULL, "html", false, &error)) {
- EM_DEBUG_EXCEPTION("attach_part failed [%d]", error);
- goto FINISH_OFF;
+ if (!attach_part(&(part_for_html->body) , (unsigned char *)input_mail_tbl_data->file_path_html, 0, NULL, "html", false, &error)) {
+ EM_DEBUG_EXCEPTION("attach_part failed [%d]", error);
+ goto FINISH_OFF;
+ }
}
}
}
text_body = NULL;
}
- else {
+ else {
text_body = mail_newbody();
if (text_body == NULL) {
if (part_for_html)
html_body = &(part_for_html->body);
- if (!emcore_write_rfc822(envelope, root_body ? root_body : text_body, html_body, input_mail_tbl_data->priority, input_mail_tbl_data->report_status, &fname, &error)) {
+ if (!emcore_write_rfc822(envelope, root_body ? root_body : text_body, html_body, input_mail_tbl_data->priority, input_mail_tbl_data->report_status, &fname, &error)) {
EM_DEBUG_EXCEPTION("emcore_write_rfc822 failed [%d]", error);
goto FINISH_OFF;
}