sending aspx as email

R

Richard Loupatty

To send an aspx to email i use this code below:

Dim objMM As New MailMessage


Dim client As New System.Net.WebClient
Dim buffer() As Byte =
client.DownloadData("http://www.mysite.nl/mypage.aspx")
Dim str As String = System.Text.Encoding.ASCII.GetString(buffer)

objMM.BodyFormat = Web.Mail.MailFormat.Html
objMM.UrlContentBase = "http://www.mysite.nl"
objMM.From = "(e-mail address removed)"
objMM.Subject = "MySite.nl news-update"
objMM.Body = str
objMM.BodyFormat = Web.Mail.MailFormat.Html

Dim x As Short
SmtpMail.SmtpServer = "my,smtpserver"

objMM.To = "someemailaddress"
SmtpMail.Send(objMM)


When i send this to a hotmail-account and open the email with msn the
layout of the email is a bit strange and not showing all the pic's.

When i get the same email with outlook/incredimail (pop3) it shows the right
layout.

Question: how to take care of msn. Perhaps when accessing the email with
webmail it will also be messed up ??


Richard Loupatty
 
H

Hermit Dave

nowadays a lot of providers are starting to block the pictures
(unfortunately i think the img tags point to the pictures on your website)
as they are not a part of the email.
 
S

Steven Cheng[MSFT]

Hi Richard,


Thanks for posting in the community! My name is Steven, and I'll be
assisting you on this issue.
From your description, you use the Smtp class in dotnet framework to send
emails in your ASP.NET web application. However, you found that when you
view the mail you sent from your ASP.NET web apps in different mail
clients(such as OutLook or Hotmail...) , the displayed layout are somewhat
different. Some picutres missed in in MSN mail client, yes?
If there is anything I misunderstood, please feel free to let me know.

As for this problem, I'm sure it is due to he different mail clients
different treatment on the receiveing mails. Also, I agree with Hermit's
opinion that some mail clients may block certain picutures or other rich
element in the mail. Or some times some certain rich format emails will
also be displayed in different layout in different mail clients. So this
doesn't due to your code or the mail conetent you've sent. How do you think
of this?

In addtion, here is a tech article on this problem:
#Display Remote Images in a Message in Hotmail
http://email.about.com/cs/hotmailtips/qt/et080903.htm

Please check out the preceding suggestions. If you have any questions,
please feel free to let me know.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
R

Richard Loupatty

Steven,

Thanks, that's a warm welcome!
Even though this is not the first time i did a posting.

But i got the message now from both you and Hermit.
It's clarified now, thanks

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top