SaveEmailById Method

Save email to specified mailbox.

[Syntax]
C++: HRESULT SaveEmailById( BSTR MailBox, BSTR Raw, BSTR MsgId, long* pVal )
Visual Basic: SaveEmailById( MailBox As String, Raw As String, MsgId As String ) As long 
C#: long SaveEmailById( string MailBox, string Raw, string MsgId )

Parameters

MailBox

Mailbox name.

Raw

Email's raw content, it can be retrieved by RawContent property of POPMSG object or by Retrieve method of POPMAIN object.

MsgId

Message-id of email, it must be retrieved by GetMsgId method of POPMAIN object.

Return Value

If this method succeeds, the return value is zero. If it fails, the return value is non-zero.

Remarks

Message id is the identifier of email on email server. You can get it by GetMsgId method of POPMAIN object. We strongly suggest you to use SaveEmailById method instead of SaveEmail method so that you can detect if this email already exists in your mailbox.

When using SaveEmail method, ANPOP generates a message-id for each mail. Please note that this id is not equal to the message-id of the corresponding email on email server.

See also

SaveEmail method


2001-2007 © Copyright AdminSystem Software Limited. All rights reserved.