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

Free Support Forum - aspose.com

Assigning Header collection property

Hi,

1. If i have a Object that has properties same like Mail. means to,cc,bcc,attachment information etc
so i want to create mail using mailmessage and assign the properties of “MyObject Object” to Mailmessage object.

But in assigning,is there necessarry to assign property header collection of Mailmessage.?
otherwise it will give exception
ecxeption: that header value not be null.

Is there any other way to create mail using object.

2.In assigning reply to property of mailmessage i have a string “CN=aa/O=aa” so it also give exception

please reply soon

Hi Pooja,


1. Could you please explain what are your requirements exactly? Could you please provide explain what type of properties you want to copy? If possible, please provide such a sample file so that we can analyze your requirements and assist you further.

2. Please provide us a sample file that creates such a problem. We’ll look into it and assist you further.

Hi

I attached a file having that object properties.In assigning those properties to MailMessage.Is it neccessary to assign header property of MailMessage.?

In case if MyObject’s all property are not set.means some of are null or empty.then there will be given exception that property not be null.

please check it and reply as soon as possible.

Hi Pooja,


It’s not necessary to set all the properties as you can see from our online documentation links. From your file, it seems that you are setting extra options, though it shouldn’t cause any issue. In order to reproduce the issue, we need some running code from your end that we can use to investigate further. I would request you to create a sample console application and send to us that can help us assist you further.