Author |
|
chuckstein Newbie
Joined: 10 February 2009 Location: United States
Online Status: Offline Posts: 3
|
Posted: 10 February 2009 at 7:14pm | IP Logged
|
|
|
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 |
|
|
Andrew AfterLogic Support
Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 11 February 2009 at 4:01am | IP Logged
|
|
|
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 |
|
|
chuckstein Newbie
Joined: 10 February 2009 Location: United States
Online Status: Offline Posts: 3
|
Posted: 11 February 2009 at 10:21am | IP Logged
|
|
|
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 |
|
|
chuckstein Newbie
Joined: 10 February 2009 Location: United States
Online Status: Offline Posts: 3
|
Posted: 11 February 2009 at 5:11pm | IP Logged
|
|
|
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 |
|
|