views:

133

answers:

2

I ve seen a lot of good and "bad" in implementation newsletters.

In my opinion Devexpress has good ones. I never clicked the "Having trouble reading this newsletter in your E-Mail client?" because the message is allways displayed correctly.

I have also seen "bad" newsletters. "Attachments, pictures, and links in this message have been blocked for your safety". By default the only option is selecting the "Show content" button. And that is a bad thing i suppose in marketing ;)

Is there any way in asp.net - vb.net, of parsing a web page and including it as body in the email?

I would like to implement a good one too!

A: 

Is this the kind of thing you are looking for? :)

http://aspnet.4guysfromrolla.com/articles/080206-1.aspx

FrostbiteXIII
A: 

Ok! This one found here works as it should

Dim objMail As New Net.Mail.MailMessage
Dim body = HttpContent("http://newsletters.example-company.gr")
objMail.IsBodyHtml = True

Private Function HttpContent(ByVal url As String) As String
        Dim objRequest As WebRequest = System.Net.HttpWebRequest.Create(url)
        Dim sr As New StreamReader(objRequest.GetResponse().GetResponseStream())
        Dim result As String = sr.ReadToEnd()
        sr.Close()
        Return (result)
    End Function
Chocol8