| | |
| | | $headers['X-Priority'] = sprintf("%d (%s)", $priority, ucfirst($str_priority)); |
| | | } |
| | | |
| | | if (!empty($_POST['_receipt'])) |
| | | { |
| | | $headers['Return-Receipt-To'] = $identity_arr['string']; |
| | | $headers['Disposition-Notification-To'] = $identity_arr['string']; |
| | | } |
| | | |
| | | // additional headers |
| | | $headers['Message-ID'] = $message_id; |
| | |
| | | |
| | | // check if mailbox exists |
| | | if (!in_array_nocase($CONFIG['sent_mbox'], $IMAP->list_mailboxes())) |
| | | $mbox = $IMAP->create_mailbox($CONFIG['sent_mbox'], TRUE); |
| | | $sent_folder = $IMAP->create_mailbox($CONFIG['sent_mbox'], TRUE); |
| | | else |
| | | $mbox = TRUE; |
| | | $sent_folder = TRUE; |
| | | |
| | | // append message to sent box |
| | | if ($mbox) |
| | | if ($sent_folder) |
| | | $saved = $IMAP->save_message($CONFIG['sent_mbox'], $header_str."\r\n".$msg_body); |
| | | |
| | | // raise error if saving failed |