:GetMessageSender()


Class

     aprPOP()

 

Syntax

     :GetMessageSender(( nMsgNo, [hSession] ) -> cSender

 

Parameters

 

nMsgNo

Message number to get information about

 

hSession

Optional: If hSession is not passed, the value in :Session will be used

 

Return

Returns the sender's address for the specified message.

 

Description

The :GetMessageSender() method returns the e-mail address of the user who sent the specified message. This allows an application to be able to easily determine the sender, without downloading the entire header block or contents of the message.

This method uses the XSENDER command, which is an extension to the POP3 protocol, to determine the address of the authenticated sender of the message. If the command is not supported, or the server was unable to authenticate the sender, the function will use the XTND XLST command to obtain the value of the "From" header field. If this command is not supported, the function will return an empty string, indicating that the sender of the message could not be determined.

 

See Also

:StoreMessage(), :GetMessage(), :GetHeaderValue(), :GetMessageHeader(), :GetMessageID()