We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose E-mail Component

Hello Aspose,


We have downloaded your latest released Aspose E-mail component and wanted to understand few features of E-mail and respective implementation.

[1] Can we get different E-mail Body Part thru Aspose API like if I need to get Email BodyPart format Text OR HTML part. Is there any provision thru Aspose API ?

[2] Can we set Authentication mode [e.g. plain authentication] while connecting to server thru POP3 Client OR IMAP client?

[3] Also Can we set different Flag Values for message like seen, None etc.






Hi,

Following are the comments against each requirement:

Ashpak Saiyed:
[1] Can we get different E-mail Body Part thru Aspose API like if I need to get Email BodyPart format Text OR HTML part. Is there any provision thru Aspose API ?

Comments:
MailMessage provides HtmlBody, HtmlBodyText, IsBodyHtml and BodyType. Please use these properties to extract the required information.

MapiMessage provides Body, BodyHtml, BodyRtf and BodyType. Please use these properties for the required information.

Ashpak Saiyed:
[2] Can we set Authentication mode [e.g. plain authentication] while connecting to server thru POP3 Client OR IMAP client?

Comments:
You may please use SecurityOptions enumerator values to select the required mode. 'SSLExplicit' option can be used for TLS, where as 'SSLImplicit' is for SSL mode. For non secure mode, please use 'None' and for automatic mode selection, 'Auto' option should be used.


Ashpak Saiyed:
[3] Also Can we set different Flag Values for message like seen, None etc.

Comments:
Refer here to change the message flags. You can change message flags by using the ImapClient.ChangeMessageFlags() method. This method takes two parameters.
  1. The message's sequence number or unique ID.
  2. MessageFlag.
The following flags can be set:
  • Answered
  • Deleted
  • Draft
  • Empty
  • Flagged
  • IsRead
  • Readed
  • Recent
Please feel free to write us back if you have any other query in this regard.

Thank you Muhammad Waqas for your quick reply and suggestions. We will try to accommodate suggested changes in our application.

Hello Aspose Team,

Thank you for previous replies.

We have few more queries regarding IMAP , POP3 and SMTP clients.

We have a requirement : First we need to connect to “Exchange server” like handshake between server and client that both could be connected and communication can happen between them.

and secondly we need to login to server with username and password.

Just want to confirm that do Aspose have two different methods like connect and login to join to server. I didn’t see any related methods like this?

Can you please elaborate more on how to connect [ handshake to server] and login to server?

Best Regards,
Ashpak Saiyed

Hello Aspose Team,

Thank you for previous replies.

We have few more queries regarding IMAP , POP3 and SMTP clients.

We have a requirement : First we need to connect to “Exchange server” like handshake between server and client that both could be connected and communication can happen between them.

and secondly we need to login to server with username and password.

Just want to confirm that do Aspose have two different methods like connect and login to join to server. I didn’t see any related methods like this?

Can you please elaborate more on how to connect [ handshake to server] and login to server?

Best Regards,
Ashpak Saiyed

Hi Ashpak,


In case of Exchange Server, the EWSClient.GetEWSClient raises exception if the credentials are wrong. So, you can catch this exception in try-catch block to determine if the credentials are correct or not. There is no connect or login method that you can use to check the provided credentials.