Don't know. Maybe Eudora doesn't handle the content type properly and
append an extension if one is missing?
Also, set the name property before you add it to the attachments collection.
On Tue, Oct 14, 2008 at 10:52 AM, rhaazy <[EMAIL PROTECTED]> wrote:
>
> I noticed that myself, I will of course try it, but I don't understand
> why it would work in all other email clients I've sent to but not
> Eudora...
> If it works I'll let you know.
>
> On Oct 14, 10:38 am, AstroDrabb <[EMAIL PROTECTED]> wrote:
> > Have you tried to set the Name property of your Attachment object?
> >
> > pdfAtt.Name = "report.pdf";
> >
> >
> >
> > On Tue, Oct 14, 2008 at 10:16 AM, rhaazy <[EMAIL PROTECTED]> wrote:
> >
> > > MailMessage mail = new MailMessage();
> > > ContentType ct = new ContentType(MediaTypeNames.Application.Pdf);
> > > MemoryStream theReport = GetReport(); //in memory pdf object that
> > > needs to be attached to email
> > > Attachment pdfAtt = new Attachment(theReport, ct);
> > > mail.Attachments.Add(pdfAtt);
> > > mail.From = new MailAddress("[EMAIL PROTECTED]");
> > > mail.To.Add("[EMAIL PROTECTED]");
> > > mail.Subject = notifySubject;
> > > mail.Body = msg;
> > > SmtpClient emailClient = new
> > > SmtpClient(Properties.Settings.Default["MailServer"].ToString());
> > > emailClient.Send(mail);
> >
> > > The problem here is that Eudora email client seems to be dropping the
> > > file extension. The only way for the clients to view the PDF is to
> > > manually add the file extension. My only thoughts are to compress the
> > > PDF and send a zip file instead. Any other ideas?
> >
> > > If I go with the compression method, do you have any suggestions other
> > > than System.IO.Compression?
> > > II have used SharpZipLib in the past but am looking for something
> > > vanilla, I really only need to create a zip file for the pdf and
> > > attach that instead.
> > > ContentType ct = new ContentType(MediaTypeNames.Application.zip);- Hide
> quoted text -
> >
> > - Show quoted text -
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/DotNetDevelopment
You may subscribe to group Feeds using a RSS Feed Reader to stay upto date
using following url
<a href="http://feeds.feedburner.com/DotNetDevelopment">
http://feeds.feedburner.com/DotNetDevelopment</a>
-~----------~----~----~----~------~----~------~--~---