收到时电子邮件格式无效 [英] Invalid Email format when receive

查看:206
本文介绍了收到时电子邮件格式无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在处理作业这些几天,我们正在使用.NET Framework 3.5中开发的窗口服务来发送电子邮件,实际上这个服务从数据库表中获取特定类型的数据,并在它找到的不同电子邮件地址上发送电子邮件。


< p style ="margin-bottom:20px; padding-right:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color: initial; font-size:13px; font-family:'Helvetica Neue',Arial,Helvetica,Geneva,sans-serif; vertical-align:baseline; border-风格family:宋体;边框颜色family:宋体;轮廓宽度:0像素;概括式family:宋体;轮廓色:初始;明确:两者;行高:的22px;颜色:#444444; text-align:left">
这里的问题是,如果此服务一次发送两封或多封电子邮件,则第一封电子邮件的格式应无效,如下面给出的消息:


< p style ="margin-bottom:20px;填充右:0像素;右边框宽度:0像素;边界底部宽度:0像素;左边框宽度:0像素;边框样式family:宋体;边框颜色family:宋体;字体大小:13像素; font-family:'Helvetica Neue',Arial,Helvetica,Geneva,sans-serif;垂直对齐:基线;边框样式family:宋体;边框颜色family:宋体;轮廓宽度:0像素;概括式family:宋体;轮廓色:初始;明确:两者;行高:的22px;颜色:#444444; text-align:left">


MIME-Version:1.0

来自:  myaddress@domain.com

要:   to_emailaddress@aaaaaa.com

日期:2012年2月20日07:48:27 +0000

主题:blah blah

内容类型:text / html; charset = us-ascii

Content-Transfer-Encoding:quoted-printable




< H1>欢迎使用我的公司< / H1> 

= 0D = 0ADear te =

st test,



= 0D = 0感谢您抽出时间申请=

为我们在My Company工作= 0D = 0ARecruitment并同意com =
$ b $在培训课程中。我们= 0D = 0非常多=
$
很高兴见到你同意= b $ b $ = 0D = 0A我的Comany工作在未来几天,我们=







,第二封或第三封电子邮件的格式正确。 

我们已经在我们的服务器上托管了这项服务,而且它在这里没有正常工作我我已经在我当地的b $ b $机器上测试了这项服务,它在那里工作正常。



我在过去三天里正在处理这个问题,但仍然找不到任何解决方案,因此我们非常感谢你们在这方面的回应。

解决方案

您好Shahnawazmr,


我们有一个类似的问题。我们有一个动态的SMTP(发送)端口,我们使用它来向多个合作伙伴发送消息。虽然消息的数量可能会有所不同,但在某个时间点,端口会以UTF-8格式发送消息。这些消息是由其中一个合作伙伴拒绝的
,仅仅因为我们做了不同意以UTF-8发送这些消息。


我们与微软一起研究了这个主题,几乎可以肯定问题出在SMTP适配器上。我们也发现了out,如果您可以解决动态发送端口并使用静态发送端口,您可以打开Ordered Delivery,
来解决问题。但对于动态端口,此选项不存在。


希望你s帮助。

Lex



I am working on an assignment these days and we are using a window service developed in the .NET framework 3.5 to send emails, actually this service fetchs specific type of data from a database table and sends emails on different email addresses it finds.

Here the problem is that if this service sends two or more emails at a time then first email should be in invalid format like the message given below:


MIME-Version: 1.0
From: myaddress@domain.com
To: to_emailaddress@aaaaaa.com
Date: 20 Feb 2012 07:48:27 +0000
Subject: blah blah
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

<H1>Welcome to My Company </H1> 
=0D=0ADear te=
st test ,

=0D=0AThank you for taking the time to apply to =
work for us at My Company =0D=0ARecruitment and agreeing to com=
e along the training session. We =0D=0Avery much=
enjoyed meeting you par=
t of =0D=0Athe My Comany working over the coming days, we=

and the second or 3rd email would be in proper format. 
We have hosted this service on one of our server and its not working here properly I’ve tested this service on my local
machine and it works fine there.

I am working on this issue from last three days, but still couldn’t find any solution, so your response in this regard will be highly appreciated.

解决方案

Hi Shahnawazmr,

We have a simular problem. We have a dynamic SMTP (Send) Port which we use to send messages to multiple partners. Although the number of messages can vary, but at a certain point the port sends messages in UTF-8 format. These messages are rejected by one of those partners, simply because we did not agree upon sending these messages in UTF-8.

Together with Microsoft we have done research on this subject and it is almost certain that the problem lies in the SMTP adapter. We have also found out, that if you can workaround a Dynamic send port and use a Static send port, you can turn on Ordered Delivery, which solves the problem. But for dynamic ports this option does not exist.

Hope this helps.
Lex


这篇关于收到时电子邮件格式无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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