使用 Google SMTP 从第三方 HTML 控件发送邮件时出现问题
时,我收到此错误
使用 HTML 编辑器 [WinHTMLEditorControl] 第三方工具使用 Google SMTP 发送电子邮件 。错误是
参数或参数中的语法错误。服务器响应是: Spam Blocked - psmtp - on - Stack Trace at
System.Net.Mail.DataStopCommand.CheckResponse(SmtpStatusCode statusCode, String serverResponse)
at System.Net.Mail.SmtpConnection.OnClose(Object sender, EventArgs args)
at System.Net.ClosableStream.Close()
at System.Net.Mail.MailWriter.Close()
at System.Net.Mail.SmtpClient.Send(MailMessage message)
我有两种不同的表单用于
- 使用 System.Windows.Forms.Web 发送电子邮件 浏览器
- HTML 编辑器这是第三部分 tool
电子邮件采用 HTML 格式
通过网络浏览器发送电子邮件时,我没有收到任何错误,并且所有邮件均已成功发送。
但是,当通过此(HTML 编辑器控件)发送相同的电子邮件时,会发生上述错误。特定电子邮件会发生这种情况,尽管我已经检查过 所有电子邮件内容都很好,似乎没有任何问题。
有什么帮助吗?
谢谢。
编辑: 我在电子邮件内容中注意到一件事,每当我的电子邮件正文包含类似
“如果预订 10 件或更多,则为您提供总价 50 英镑折扣”之类的文本。 或者 “每人押金 10 英镑或在11 月 30 日星期二下午 5 点之前至少存入 80 英镑。”
当我使用 HTML 编辑器删除此信息时,电子邮件未发送,
使用 Web 浏览器控件发送相同的邮件,并且所有邮件均已发送。 我想澄清的一件事是,网络浏览器生成的电子邮件包含正确的 html 选项卡
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
,但 html 编辑器不包含它们。这是否与此有关?
I am getting this error when sending email using an HTML Editor [WinHTMLEditorControl] third party tool
Using Google SMTP For sending emails. Error is
Syntax error in parameters or arguments. The server response was: Spam Blocked - psmtp - on - Stack Trace at
System.Net.Mail.DataStopCommand.CheckResponse(SmtpStatusCode statusCode, String serverResponse)
at System.Net.Mail.SmtpConnection.OnClose(Object sender, EventArgs args)
at System.Net.ClosableStream.Close()
at System.Net.Mail.MailWriter.Close()
at System.Net.Mail.SmtpClient.Send(MailMessage message)
I have two different forms for sending emails
- Using System.Windows.Forms.Web
browser - HTML Editor which is a third part
tool
Emails are in HTML format
When sending email through web browser I don't get any error and all mails are sent successfully.
But when sending same emails through this (HTML Editor control) the above given error occur. This happens with specific emails, Although i have checked
all the email contents and they are fine nothing seems wrong.
Any help?
Thanks.
Edit:
One thing i have noticed in my email content that when ever my email body contains text like
"to offer you a Discount of £50 OFF the total price if booked for 10 or more."
OR
"deposit of £10 per person OR a minimum of £80 by Tuesday 30th November, 5pm."
email is not sent, when i remove this information using HTML Editor mail is sent
Same mail is sent using Web Browser control and all are sent.
One thing i want to clerify that web browser generated email contains proper html tab like
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
but html Editor does not include them. Is this has to do some thing with that ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如消息所示“垃圾邮件已阻止 - psmtp”,SMTP 服务器认为该电子邮件看起来像是垃圾邮件,因此拒绝发送它。
我不确定 Google 是否发布了有关何时将电子邮件视为垃圾邮件的规则,但如果没有,您只需尝试重新措辞电子邮件,直到它们通过垃圾邮件过滤器。我猜想,如果手动发送完全相同的内容可以工作但使用该控件失败,则该控件可能会在某处添加一些额外的 HTML。
这里有一个链接,其中包含一些让您的电子邮件看起来不像垃圾邮件的建议。
As the message says Spam Blocked - psmtp, the SMTP server is deciding that the email looks like it is spam, and so is refusing to send it.
I'm not sure if Google publishes their rules for when an email is seen as spam, but if not, you'll just have to try to rephrase the emails until they pass the spam filter. I'd guess that if the exact same content works if sent manually but fails using the control, the control probably adds some extra HTML somewhere.
Here's a link with some advice for making your email look less like spam.