There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen boot bsod computer connection crash css dell display driver drivers email error excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop linux malware network networking outlook outlook 2003 outlook express partition password printer problem ram router security slow software sound trojan usb video virus vista windows windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Embedding mhtml file into email message


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
liliarum's Avatar
Junior Member with 6 posts.
 
Join Date: Jul 2004
Experience: Intermediate
04-Aug-2004, 10:51 AM #1
Embedding mhtml file into email message
Could anybody help me.
(I am working on .NET)
My problem is: I create MailMessage, attach MHTML file and send it using SmtpMail. If I send file of any othe format then mhtml the receiver gets the message with the attached file (ex. MyFile.pdb), but when I send a message with MHTML attachment, the receiver gets the message with the attachement called "Untitled Attachment". When I click on it a new message window opens up with the attached MHTML file embedded in it.
I need either the MHTML file was specified as a file (MyFile.mhtml) or to be embedded into the message when the receiver opens it. How can I do this?

Thank you in advance.


Here is my code:

MailMessage mail = new MailMessage();

mail.From = strSenderEmailAddress;
mail.To = strAddresseeEmailAddress;
mail.Subject = "...";
mail.BodyFormat = MailFormat.Html;

MailAttachment attachment = new MailAttachment( "C:\\Program Files\\Level Platforms\\Service Center\\BasicReports\\LPI 612Demosys_BasicReport.mhtml" );

mail.Attachments.Add( attachment );

SmtpMail.SmtpServer = "localhost";
SmtpMail.Send(mail);
Rockn's Avatar
Computer Specs
Distinguished Member with 17,888 posts.
 
Join Date: Jul 2001
Location: Mexico of the North, MN
Experience: Disenfranchised American Male
04-Aug-2004, 10:57 AM #2
What is an mhtml file? The end user receiving the file probably has no file associations set up to open this file. Many mail servers and mail clients also block HTML formatted messages. What mail client are they using?
liliarum's Avatar
Junior Member with 6 posts.
 
Join Date: Jul 2004
Experience: Intermediate
04-Aug-2004, 02:10 PM #3
MHTML file format is a standard format for aggregation html and all resources it refers.
The mail client is Outlook, but I think it's not an issue: if I attach mhtml file manually in Outlook it is delivered normally.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:28 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.