SmtpClient使用小写标头 [英] SmtpClient uses lowercase headers

查看:138
本文介绍了SmtpClient使用小写标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

这里遇到了一个奇怪的问题...

基本上,我们的应用程序会发送带有自定义X-Header的电子邮件.在开发箱中,标题以大小写混合出现(例如"X-EmailID"),但是当我们将应用程序移至实时框时,电子邮件中的标题将转换为小写(例如"x-emailid")

我需要保留大写字母.

除了有人说他们已经看到了问题但没有解决的方法以外,我已经在Google上进行了搜索,但是发现的却不多,这是必须的.



任何帮助都将不胜感激

Baz

Hi there,

Got a strange problem here...

Basically, our application sends out an email with a custom X-Header. On the dev box, the header comes out in mixed case (eg "X-EmailID"), but when we move the app to the live box, the header in the email is converted to lower case (e.g. "x-emailid")

I need to keep the capitalisation. Has anyone seen this before, and did you find a solution?

I''ve googled this but haven''t found much, other than people saying they have seen the problem but no fix - there has to be some config that is different between the two boxes, surely!?!

Any help greatly appreciated

Baz

推荐答案

尝试使用System.Web.Mail类,该类利用Microsoft的Collaboration Data Objects发送电子邮件.对于过时的类,忽略编译器的警告消息.

Try to use the System.Web.Mail classes, which make use of Microsoft''s Collaboration Data Objects to send emails. Ignore compiler''s warning messages for obsolete classes.


这篇关于SmtpClient使用小写标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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