GetMail |
This Web service operation is used to retrieve a single mail from the mail server. To use this API, you must set a valid profile. If not, an 'Authentication Failed' error is thrown.
SOAP Request
<GetMail xmlns="http://schemas.cordys.com/1.0/email">
<messageId>1</messageId>
<folder>INBOX</folder>
<includeHeaders>true</includeHeaders>
</GetMail>
<GetMail xmlns="http://schemas.cordys.com/1.0/email"> <messageId>1</messageId> <folder>INBOX</folder> <includeHeaders>true</includeHeaders> </GetMail>
Request Parameters
Parameter |
Description |
---|---|
messageId |
Specifies the serial number of the mail in the mail box. It is always denoted in the reverse chronological order. Example: The messageId of the oldest mail is
1.
|
includeHeaders |
When set to 'true', displays the header information of the mail. |
folder |
Specifies the folder in the mailbox from which the mails must be retrieved. |
SOAP Response
<GetMailResponse xmlns="http://schemas.cordys.com/1.0/email">
<tuple>
<old>
<mail>
<from>
<address>
<mailAddress>[email protected]</mailAddress>
<displayName/>
</address>
</from>
<to>
<address>
<mailAddress>[email protected]</mailAddress>
<displayName>John Smith</displayName>
</address>
</to>
<flags>
<flag name="answered">false</flag>
<flag name="deleted">false</flag>
<flag name="draft">false</flag>
<flag name="flagged">false</flag>
<flag name="recent">false</flag>
<flag name="seen">true</flag>
</flags>
<subject>RE:</subject>
<body>Hi John, I just called the networks guy and he said he can fix it. He asked me to check the Connection Points once again.</body>
<body>If</body>
<sentDate>Tue Aug 20 12:34:01 IST 2002</sentDate>
<headers>
<header name="header1">header value1</header>
<header name="header2">header value2</header>
</headers>
</mail>
</old>
</tuple>
</GetMailResponse>
<GetMailResponse xmlns="http://schemas.cordys.com/1.0/email"> <tuple> <old> <mail> <from> <address> <mailAddress>[email protected]</mailAddress> <displayName/> </address> </from> <to> <address> <mailAddress>[email protected]</mailAddress> <displayName>John Smith</displayName> </address> </to> <flags> <flag name="answered">false</flag> <flag name="deleted">false</flag> <flag name="draft">false</flag> <flag name="flagged">false</flag> <flag name="recent">false</flag> <flag name="seen">true</flag> </flags> <subject>RE:</subject> <body>Hi John, I just called the networks guy and he said he can fix it. He asked me to check the Connection Points once again.</body> <body>If</body> <sentDate>Tue Aug 20 12:34:01 IST 2002</sentDate> <headers> <header name="header1">header value1</header> <header name="header2">header value2</header> </headers> </mail> </old> </tuple> </GetMailResponse>