C#:使用附件序列化邮件消息对象 [英] C# : serialize mail message object with attachment

查看:90
本文介绍了C#:使用附件序列化邮件消息对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个类,我用json serialser传递mailmessage对象,比如



I have a class where i pass mailmessage object with json serialser like

JsonConvert.SerializeObject(mailmessage);





问题是如果我在邮件对象上添加附件我在JsonConvert收到错误,否则它工作正常,任何人都可以帮我如何转换邮件附加到json的对象。



先谢谢。



我尝试过:





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:

JsonConvert.SerializeObject(mailmessage);

推荐答案

因为你说在发布到azure队列时出现容量错误。如果您使用的是队列存储,则除非您启用Blob存储,否则消息的最大限制为64KB。
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.


这篇关于C#:使用附件序列化邮件消息对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆