|
-
Aug 25th, 2006, 12:36 PM
#1
Thread Starter
Fanatic Member
sending email from .NET
I have an ASP.NET 1.1 (VB.net 2003) application that reads in an HTML file and emails it to a user. I am getting some quirky formatting problems. I'm using a web version of MS Exchange to receive the file.
Before I go into specifics, is there anything obvious I need to know about emailing a file in HTML format? Here's some code:
mymail.To = mailto
mymail.From = "[email protected]"
mymail.Priority = MailPriority.Normal
mymail.BodyFormat = MailFormat.Html
mymail.Subject = "Subject of message"
mymail.Body = message
SmtpMail.SmtpServer = "xxx.xxx.xxx.xxx"
SmtpMail.Send(mymail)
-
Aug 25th, 2006, 03:41 PM
#2
Re: sending email from .NET
No, as long as you specify it as HTML format (which I see you are doing) there shouldn't be any problems..
however if your actual emailing code is working, and its only formatting that you are having an issue with, then it may be that you are rendering HTML that is not compatible with the rendering engine of your client application that is receiving the file...
I guess you will need to elaborate more, perhaps show an example.
-
Aug 28th, 2006, 07:36 AM
#3
Thread Starter
Fanatic Member
Re: sending email from .NET
Should the email page be just the <body> of an HTML page, or a full HTML page for showing up in an email? I read it in as a string and put it into mymail.Body.
-
Aug 28th, 2006, 08:16 AM
#4
Re: sending email from .NET
Just the body I would imagine, unless you have any specific information in the head section that you need to keep.
You can do some simple testing and send different HTML emails and see which ones format properly, and which ones don't. Then compare the 2 and see what is different.
-
Aug 28th, 2006, 08:33 AM
#5
Thread Starter
Fanatic Member
Re: sending email from .NET
Its formatting ok on most emails ( gmail, yahoo, etc) but one person is getting the email cut off halfway and another is getting bad formatting.
-
Aug 28th, 2006, 09:17 AM
#6
Re: sending email from .NET
what provider/email client do they use?
Its probably working ok in gmail and yahoo because you are visiting those sites in IE, and its IE that is doing the rendering, not the email service.
Have you looked at them in firefox to see if it works there too?
-
Aug 29th, 2006, 11:02 AM
#7
Re: sending email from .NET
Can you show us some sample HTML being generated?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|