Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a class where i pass mailmessage object with json serialser like

C#
JsonConvert.SerializeObject(mailmessage);


The problem is if i add attachment to mail object i am getting error at JsonConvert else it is working fine, can anyone help me how to convert mail object with attachment into json.

Thanks in Advance.

What I have tried:

C#
JsonConvert.SerializeObject(mailmessage);
Posted
Updated 30-Oct-18 10:02am
v3
Comments
Richard MacCutchan 8-Aug-18 5:15am    
"i am getting error"
No one here can guess what that error may be.
Ravi Sargam 8-Aug-18 5:18am    
one more question, can i serialize mail message with attachment?
Richard MacCutchan 8-Aug-18 5:29am    
No idea, what happens when you try?
Ravi Sargam 8-Aug-18 5:34am    
i am passing mail message object to azure cloudQueueMessage class's constructor to add message to cloudqueue class. I am getting some capacity error, due to some issue i am unable to give exact error message.
Richard MacCutchan 8-Aug-18 5:41am    
"I am getting some capacity error, due to some issue i am unable to give exact error message."
As I already explained, no one here can guess what the message may be.

1 solution

Since you say capactiy error while posting to azure queue. If you are using Queue Storage, then the maximum limit on a message is 64KB unless you enable Blob Storage.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900