473,396 Members | 2,034 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

SMTP and MailMessage: My legit emails are maked as spam

Hi All,

I am EXTREMELY desperate.

I have a website. (asp.net2 with c#)

User registers, their account is created in a locked state. They receive an email message to confirm that their email address is correct, they click on the link in the email, and their account is unlocked and ready to use.

EXCEPT: They never receive their email message, because it is seen as spam. So they sit there waiting for the message that doesn't arrive, and just end up leaving.

The message is sent by simply creating an instance of MailMessage, adding the to, from, subject and body fields, and then sent. Nothing fancy.

Among the reasons that I could find for my message being marked as spam are:

(From a friend's mail marshal log):

Very small body (15 points!),
Missing message-id,
"RH_GENR_HeaderSus146": (Header pattern common in Spam) (added 16 points)
"RH_GENR_HeaderSus653": (Header pattern common in Spam) (Added 24 points!!)
HeloOneW (1 point)
Missing X-Mailer: Field (2 points)

I have been trying to solve this for days, but any search on Google will return thousands of results on how to PREVENT spam, and not on how to prevent being marked as spam when it is not spam.

I am very desperate, and this is very urgent, as I am chasing away one in 5 clients, and my web site is getting really really bad exposure!

Anybody who has a quick and easy step-by-step solution will be my hero!!! (I am still fairly new to .net, and know even less about email protocols.)

Thx!!
Mar 13 '07 #1
5 3587
kenobewan
4,871 Expert 4TB
Please provide an example email, excluding personal details. You may need to gain an understanding of how spam filters work...
Mar 13 '07 #2
Thx for the reply!!

Here's an example of an email (with header info):

Delivered-To: louisjvd@gmail.com
Received: by 10.114.149.17 with SMTP id w17cs124151wad;
Tue, 13 Mar 2007 04:46:32 -0700 (PDT)
Received: by 10.66.221.6 with SMTP id t6mr1465725ugg.1173786392011;
Tue, 13 Mar 2007 04:46:32 -0700 (PDT)
Return-Path: <Mail@neverforgotten.co.za>
Received: from BEACH.home ([70.85.5.138])
by mx.google.com with ESMTP id k30si9509710ugc.2007.03.13.04.46.17;
Tue, 13 Mar 2007 04:46:32 -0700 (PDT)
Received-SPF: error (google.com: error in processing during lookup of Mail@neverforgotten.co.za: DNS timeout)
Received: from housepc ([41.241.219.172]) by home with MailEnable ESMTP; Tue, 13 Mar 2007 07:45:58 -0400
From: "NeverForgotten" <Mail@neverforgotten.co.za>
To: <louisjvd@gmail.com>
Subject: Mail Header from Outlook
Date: Tue, 13 Mar 2007 13:46:07 +0200
Message-ID: <CDEBKHLHNOBINNPLKDLEMEFBCAAA.Mail@neverforgotten. co.za>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on beach
X-Spam-Level:
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.64
Mar 13 '07 #3
Oops!! Sorry!!

The email in the previous post is the wrong one. That one was sent from Outlook, and as far as I can see, they work if sent from outlook.

Here is an example of an email sent programmatically (that doesn't get deliverd)

Delivered-To: louisjvd@gmail.com
Received: by 10.114.149.17 with SMTP id w17cs124268wad;
Tue, 13 Mar 2007 04:47:49 -0700 (PDT)
Received: by 10.67.117.18 with SMTP id u18mr1125595ugm.1173786469244;
Tue, 13 Mar 2007 04:47:49 -0700 (PDT)
Return-Path: <Mail@neverforgotten.co.za>
Received: from BEACH.home ([70.85.5.138])
by mx.google.com with ESMTP id u1si9476675uge.2007.03.13.04.47.34;
Tue, 13 Mar 2007 04:47:49 -0700 (PDT)
Received-SPF: error (google.com: error in processing during lookup of Mail@neverforgotten.co.za: DNS timeout)
Message-Id: <45f68f5a.7ba24bf6.723c.0fe0SMTPIN_ADDED@mx.google .com>
Received: from housepc ([41.241.219.172]) by home with MailEnable ESMTP; Tue, 13 Mar 2007 07:47:15 -0400
mime-version: 1.0
from: Mail@neverforgotten.co.za
to: louisjvd@gmail.com
date: 13 Mar 2007 13:47:28 +0200
subject: Membership activation
content-type: text/plain; charset=us-ascii
content-transfer-encoding: quoted-printable
X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on beach
X-Spam-Level:
X-Spam-Status: No, hits=-4.6 required=5.0 tests=BAYES_00,CLICK_BELOW,
NO_REAL_NAME autolearn=no version=2.64

Hi Person,=0D=0DThank you for registering on NeverForgotten. =0D=0DYou have=
received this email message because you applied for membership on the www.NeverForgotten.co.za=
website.=0D=0DTo activate your membership, simply click on the link below.=
You will automatically be logged in, and returned to the page you requested.=
=0D=0Dhttp://www.NeverForgotten.co.za/ActivateAccount.aspx?Uid=3D46f4f9d1-bbd0-4cca-8f67-055a0792e64d=
=0D=0DIf you believe that you have received this email in error, please=
contact us at mail@NeverForgotten.co.za, and let us know about this mistake=
so that we can attempt to rectify the problem.=0D=0DThank you=0D=0DNeverForgotten
Mar 13 '07 #4
kenobewan
4,871 Expert 4TB
Please post your code that you use to send email. I hope that the email wasn't a red herring. Thanks.
Mar 14 '07 #5
Hi,

I don't know what a red herring is, but I also hope it isn't one :)

This is the code that was used to send the message. The first half of the code is just building the email body, so don't worry too much about that...


Expand|Select|Wrap|Line Numbers
  1.         string MailServerName = "mail.neverforgotten.co.za";
  2.         //MembershipUser user = Membership.GetUser(CreateUserWizard1.UserName);
  3.         Guid userId = Guid.NewGuid();
  4.  
  5.         string sString = "Hi " + "Person" + ",\r\rThank you for registering on NeverForgotten. \r\rYou have received this email message because you applied for membership on the www.NeverForgotten.co.za website."
  6.             + "\r\rTo activate your membership, simply click on the link below. "
  7.             + "You will automatically be logged in, and returned to the page you requested.\r\r"
  8.             + "http://www.NeverForgotten.co.za/ActivateAccount.aspx?Uid=" + userId.ToString();
  9.  
  10.         if (!(Request.QueryString["ReturnUrl"] == null || Request.QueryString["ReturnUrl"] == ""))
  11.         {
  12.             //string tmpstr=Request.QueryString["ReturnUrl"].Replace("?", "&")
  13.             sString += "&ReturnURL=" + Request.QueryString["ReturnUrl"];
  14.         }
  15.         if (Session["PersonID"] != null)
  16.         {
  17.             //Get the key for the current person
  18.             DataSet1TableAdapters.KeysTableAdapter ta = new DataSet1TableAdapters.KeysTableAdapter();
  19.             DataSet1.KeysDataTable dt = ta.GetKeyForPerson(Convert.ToInt32(Session["PersonID"]));
  20.             sString += "&Key=" + dt[0].KeyID;
  21.         }
  22.  
  23.         sString += "\r\rIf you believe that you have received this email in error, please contact us at mail@NeverForgotten.co.za, and let us know about this mistake so that we can attempt to rectify the problem."
  24.             + "\r\rThank you\r\rNeverForgotten";
  25.  
  26.         //Label1.Text = sString;
  27.  
  28.         string sSubj = "Membership activation";
  29.         //string sSubj = "TEST";
  30.         MailMessage msg = new MailMessage(); //("Mail@neverforgotten.co.za", TextBox1.Text, sSubj, sString);
  31.         msg.From = new MailAddress("Mail@NeverForgotten.co.za", "NeverForgotten");
  32.         msg.To.Add(new MailAddress(TextBox1.Text));
  33.         msg.Subject = sSubj;
  34.         msg.Body = sString;
  35.  
  36.         SmtpClient MailClient = new SmtpClient(MailServerName);
  37.  
  38.         MailClient.Send(msg);
  39.         msg.Dispose();
  40.  
Mar 14 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Janna Deegan | last post by:
Hello all, First off, if there is a better place to post for an answer to this question, please feel free to point me there. I have some very strange behavior happening with my System.web.mail...
5
by: R. Ian Lee | last post by:
I'm using the System.Web.Mail.SmtpMail object (.NET 1.1) to send email from an ASP.NET application. Everything works fine when I run it from Windows 2000 Server, but not from WinXP Pro. Is it...
6
by: Brian M | last post by:
I have an ASP.NET application using .NET Framework 1.1 running on a Windows 2003 server. The application uses SMTP to send emails. This application was moved from an IIS 5 machine where it worked...
1
by: Srinivas | last post by:
Hi, I am using ASP.NET SmtpMail to send email using the following code public void SendEmail(string From, string To, string Subject, StringBuilder Message, string Attachment, string...
2
by: Mart | last post by:
hi, urgent assistance needed I have been developing some webforms in VB.NET that have email submissions. I developed them locally using VS .NET 2003 on XP Prof. Then tested them on our...
34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
6
by: Adam Honek | last post by:
Okay. This is a little strange but here goes. I wanted to send emails and hence wrote the first sub below. It worked however it would NOT send the email UNLESS I closed the application (hence...
11
by: ibiza | last post by:
Hi all, I am trying to use the System.Net.Mail class for the first time, with ASP.NET 2.0. I setup everything according to http://www.codeproject.com/aspnet/EasySMTP_package.asp, which gives...
5
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi, I'm using this code for sending emails and its working fine because I had configured SMTP in my machine in IIS. now I'm using machine as a server for this application. but when running the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.