I'm trying to make a Silverlight email client. Since there's no direct IMAP connection possible from silverlight, I've wrapped the email objects in objects. Attachments are the biggest challenge.

One thing I'm considering is having my silverlight application launch a browser window, specifying a message id and attachment, and trying to just kick in the standard browser download functionality.

Has anyone else written any asp.net email clients with these tools, or know what exactly I'd need to write?

asked 27 Jul '10, 15:46

Dan%20Billingsley's gravatar image

Dan Billingsley
16
accept rate: 0%

edited 10 Aug '10, 13:08

Rebex%20KB's gravatar image

Rebex KB ♦♦
256312


Actually, this situation is not described in any Rebex MAIL sample, although something similar is used in samples for Rebex ZIP.

If I understand your problem well, the trick you are looking for is writing the attachment into HTTP Response stream. Core of the solution is shown in following code snippet:

Attachment attachment;

// ...retrieve the attachment from mail message...

Response.Clear();
Response.Buffer = false;
Response.ContentType = "application/octet-stream";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + attachment.FileName);
attachment.Save(Response.OutputStream);
Response.End();
link

answered 28 Jul '10, 13:58

Jan%20Sotola's gravatar image

Jan Sotola ♦♦
3315
accept rate: 34%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×71
×46
×10
×7
×1

Asked: 27 Jul '10, 15:46

Seen: 858 times

Last updated: 10 Aug '10, 13:08