Asp.Net and Aweber

by Mark Wiseman on June 30th, 2009 | Posted in Revium Sandbox | Read the comments

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 MAILER-DAEMON@mail1.aweber.com saying:
Hi. This is the qmail-send program at mail1.aweber.com. 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 strangley:
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 recieving =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.To.Add(pTo)
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
message.AlternateViews.Add(plainView)

Dim smtpClient As SmtpClient = New SmtpClient
smtpClient.Send(message)

Related posts:

  1. Why should a company outsource thier email delivery?

Tags: email

« Power of the ASP.NET MVC + jquery

Javascript Window Tiling »

2 Responses to “Asp.Net and Aweber”

  1. Arnold Shields says:
    October 2, 2009 at 6:11 pm

    Many thanks for posting that it is saving a lot of time.

    I am using login control to send details directly direct to aweber.
    The alternate view now looks fine but still error?

    Any thoughts?

  2. Mark Wiseman says:
    October 5, 2009 at 1:49 pm

    Hi Arnold.
    It’s really hard to say without seeing the error you are receiving now. If =0D=0A has been removed it is possibly the parser you have set up in AWeber. That is what they kept telling us our problem was. Maybe check that.

Leave a Reply

Click here to cancel reply.

Recent Articles

  • Return of the daily sites
  • Collaborating with Government
  • Ya-bing-ooo!! Yahoo search is dead long live the Bing.
  • Social Media – Good For Some
  • 10 Tips for user acceptance testing of web applications
  • Popular Content Management Systems
  • ASP.NET MVC [HandleError] and logging
  • VMWare hard lessons

Twitter

  • Collaborating with Government: Revium is actively involved in the Federal Government’s R&D program for tax concess... http://bit.ly/9D7Vc6 3 days ago
  • 45 Free Applications For Web Designers & Developers http://www.noupe.com/tools/45-free-applications-for-designers-and-developers.html 1 week ago
  • In most watch advertisements the time displayed on the timepiece is 10:10 because then the arms frame the brand of the watch. 1 week ago
  • More updates...

Revium Logo

  • Home
  • About
  • Expertise
  • Showcase
  • Contact

  • news
  • blog
  • sandbox
  • twitter
  • facebook
  • rss
Bookmark and Share

We are Revium, hear us roar!

The news.

31 Aug

Collaborating with Government

Revium is actively involved in the Federal Government’s R&D program for tax concessions to develop our in-house products that we are looking to take…

Continue reading
View archive

The blog.

01 Sep

Return of the daily sites

Years ago I used to have a morning routine of checking a select few websites I came across. For one reason or another I…

Continue reading
View archive

The sandbox.

20 Aug

Ya-bing-ooo!! Yahoo search is dead long live the Bing.

Ya-bing-oo!! Yahoo search is dead long live the Bing In July 2010 Yahoo had started testing Bing powered search they routed 25% of their search…

Continue reading
View archive

eNewsletter.

 

© Copyright 2010. All Rights Reserved.

Revium Pty Ltd

e / info@revium.com.au t / Work +61 3 9429 2000

Find us: web development, seo

Disclaimer and privacy Revium Pty Ltd

10 Harvey Street
Richmond, Victoria, 3121 Australia
View map

Logo Partner MicrosoftLogo Partner KenticoLogo Partner IiaLogo Partner Iia RibLogo Partner Acs