Search The ForumSearch   RegisterRegister  LoginLogin

MailBee IMAP4

 AfterLogic Forum : MailBee IMAP4
Subject Topic: SaveMessageAppendMessage problem Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
chuckstein
Newbie
Newbie


Joined: 10 February 2009
Location: United States
Online Status: Offline
Posts: 3
Posted: 10 February 2009 at 7:14pm | IP Logged Quote chuckstein

I want to use the AppendMessage method. I have been using this to save a message from one mailbox:

Set Message = oMailer.RetrieveSingleMessage(1, False)
      
      If Not Message Is Nothing Then

        Message.SaveMessage "C:\msg4.eml"

      End If

and then trying to use this to append it to another mailbox:


If oMailer.AppendMessage ("9103/Inbox","C:\msg4.eml", , , 1) Then
    MsgBox "Message uploaded successfully"
    Else
    
    MsgBox "Error # " & oMailer.ErrCode
    MsgBox "Server REsponse: " & oMailer.ServerResponse
End If

The AppendMessage fails with error code 312.

If I look at msg4.eml in Notepad it has a WAV attachment that is Base64 encoded. The problem is that after it is saved using the SaveMessage method, the format for the messsage doesn't seem to follow Base64 where after the 76th character there is a carriage return and line feed.

I can manually edit the msg4.eml file with a hex editor to follow the 76 character rule and get it to work with the AppendMessage method.

Am I missing something with the SaveMessage method if there is an attachment that is Base64 encoded?

Thanks,

CS
Back to Top View chuckstein's Profile Search for other posts by chuckstein
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 11 February 2009 at 4:01am | IP Logged Quote Andrew

Try to receive the same message from the same account via Outlook Express (not MS Office Outlook) and save it as .eml file (File / Save As). Take a look at the .eml contents. Is there any difference with contents of the .eml saved via Message.SaveMessage?


Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
chuckstein
Newbie
Newbie


Joined: 10 February 2009
Location: United States
Online Status: Offline
Posts: 3
Posted: 11 February 2009 at 10:21am | IP Logged Quote chuckstein

Andrew,

Thanks. I tried that and looked at the resulting .eml and it doesn't have the additional EOL CR/LF characters after the 76th character. I guess I'll have to save the WAV file attachment and then do my own Base64 MIME encoding with the additional EOL and CR/LF characters after each 76th character.

Unless you have another suggestion?

CS
Back to Top View chuckstein's Profile Search for other posts by chuckstein
 
chuckstein
Newbie
Newbie


Joined: 10 February 2009
Location: United States
Online Status: Offline
Posts: 3
Posted: 11 February 2009 at 5:11pm | IP Logged Quote chuckstein

Andrew,

Nevermind. I did more testing and it works. The files I were looking at had a CR/LF and then a Space character. The CR/LF was always there and it works. Mark it down as User Error.

CS
Back to Top View chuckstein's Profile Search for other posts by chuckstein
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide