Problem sending Mail using Google SMTP from a third party HTML control
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 includ开发者_StackOverflowe them. Is this has to do some thing with that ?
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.
精彩评论