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

Free Support Forum - aspose.com

Https and microsoft exchange 2010 problem!

Hello,

I have Aspose.network 5.6 and i am trying to connect to microsoft exchange 2010 but seem to be facing a problem. I use your example Connect to Microsoft Exchange Server using Exchange Web Services and i do connect to the server, but when I try to send an email with your example again using exchange web services It fails giving me the following error

"Object reference not set to an instance of an object"

and i cannot figure out why does this happen.

Thank you

Sofia

Hello Sofia,


Thanks for inquiry.

We will check this scenario with Exchange 2010 and will get back to you.

Hi,


I just tried to send email via EWS using Exchange Server 2010 and it got sent without any problem. Below is the code that I used:
static string mailboxURI = "https://ex2010/ews/exchange.asmx"; // EWS
static string username = "administrator";
static string password = "pwd";
static string domain = "ex2010.local";
static string sender = "administrator@" + domain;
static string recipient = "administrator@" + domain;

NetworkCredential credential = new NetworkCredential(username, password, domain);
ExchangeWebServiceClient client = new ExchangeWebServiceClient(mailboxURI, credential);
MailMessage message = new MailMessage(sender, recipient, "01- test email", "test email");
message.TextBody = "test email";
client.Send(message);

Could you please share your code sample and tell us on which line this exception occur?