ALFitness recently wanted to change their users’ email marketing tool and decided to use aweber. This looked like it would be a simple process but ended up being a nightmare.

When a user joined ALFitness we would subscribe them to an email list in aweber by sending an email. This was not a problem. The problems started when we wanted to parse information from that email so it could be used in the marketing campaign.

i.e. Saving current exercise frequency and activities they enjoyed.

We would receive an email from saying:
Hi. This is the qmail-send program at I’m afraid I wasn’t able to deliver your message to the following addresses. This is a permanent error; I’ve given up. Sorry it didn’t work out.

It would then attach a copy of our email with the body formatted strangly:
Exercise Regularity: 1-3 times per week=0D=0AActivities Enjoyed: Home gym=0D=0A

The problem is instead of Carriage Return Line Feeds it was receiving =0D=0A. After a lot of time on the phone with Aweber and a lot of searching I found out that we were sending our emails with: Content-Transfer-Encoding: quoted-printable. Apparantly there are some systems that cannot recognize this and we would need to change this to 7bit. It isn’t obvious how to do this but this is how we achieved it:

Dim message As MailMessage = New MailMessage
message.From = New MailAddress(from)
message.Subject = subject

message.BodyEncoding = Encoding.GetEncoding("iso-8859-1")

Dim plainView As AlternateView = AlternateView.CreateAlternateViewFromString(body, Encoding.GetEncoding("iso-8859-1"), "text/plain")
plainView.TransferEncoding = Net.Mime.TransferEncoding.SevenBit 'VERY IMPORTANT

Dim smtpClient As SmtpClient = New SmtpClient

You may also like

Limiting LINQ String Field Lengths

We recently had an issue where a string value in our LINQ object was changed and became longer than the database field it represented.  I know that the correct solution is to implement the proper checks early in the change cycle but it is annoying that the LINQ object doesn’t say: “Hey, you, coder… you can’t set a value that long.

Keep Reading

Power of the ASP.NET MVC + jquery

What a hectic couple of last months we have had with the SE New Products project team (Liani has blogged about this project earlier)! Quite a few work weekends and lots of things learned. That was our first serious test of becoming famous with the MS ASP.NET MVC framework. Particularly interesting from technical point of view were the following.

Keep Reading

Newsletter sign up

Every couple of months we send out an update on what's been happening around our office and the web. Sign up and see what you think. And of course, we never spam.