Jump to content

[SOLVED] lol an other (new) attachment prob >.<


drisate

Recommended Posts

Hey guys ... lol this is not funny ... there's a very big problem with documentation on this IMAP thing

 

This time ia m having a bad time saving my attachment to my draft and sent inbox ... (The message is stored ... but not the attachment with it) The message is sent with no problem thought ... it's just making a copy that is not working.

 

if ($_POST[submit]!="Save to Drafts"){$success = mail($to, $su, $Body, $Headers);}else{$success="true";}
    if ($success)
    {
        showBody("");
        if ($_POST[submit]!="Save to Drafts"){echo "Mail is sent!";}else{echo "Mail is saved!";}
        if (isset($_POST['oldmessage']) && isset($_POST['oldmessage_delete']) && $_POST['oldmessage_delete'] ==
            "true")
        {
            echo " Also deleting original message.";
            delete($_POST['oldmessage']);
        }

$stream = imap_open("{mail.***.org:143/imap/notls}", "$_SESSION[session_username]", "$_SESSION[session_password]");
$check = imap_check($stream);

if ($_POST[submit]=="Save to Drafts"){
imap_append($stream, "{mail.***.org:143/imap/notls}INBOX.Drafts"
                   , "From: $_POST[fr]\r\n"
                   . "To: $to\r\n"
                   . "Subject: $su\r\n"
                   . "\r\n"
                   . html_entity_decode($ms) . "\r\n"
                   );
}else{
imap_append($stream, "{mail.***.org:143/imap/notls}INBOX.Sent"
                   , "From: $_POST[fr]\r\n"
                   . "To: $to\r\n"
                   . "Subject: $su\r\n"
                   . "\r\n"
                   . html_entity_decode($ms) . "\r\n"
                   );	
}

Link to comment
https://forums.phpfreaks.com/topic/147677-solved-lol-an-other-new-attachment-prob/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.