Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > email attachment from string

Reply
Thread Tools

email attachment from string

 
 
=?iso-8859-2?Q?Piotr_W=F3jcicki?=
Guest
Posts: n/a
 
      09-09-2004
Is there any way of sending email with attachment created from string ? I dont want to save this string as Text file on hard drive.

Thank you
Piotr Wójcicki
 
Reply With Quote
 
 
 
 
GrantMagic
Guest
Posts: n/a
 
      09-09-2004
I had a similair issue.

The way i got around it, was by first creating a file on the server.
Attaching that file to the email and sending it,
and then finally deleting the file from the server.

Hope that helps

------------------------------------------------------


"Piotr Wójcicki" <pwl@USUN_TO.4me.pl> wrote in message
news:chp9al$2v3$(E-Mail Removed)...
Is there any way of sending email with attachment created from string ? I
dont want to save this string as Text file on hard drive.

Thank you
Piotr Wójcicki


 
Reply With Quote
 
 
 
 
=?iso-8859-2?Q?Piotr_W=F3jcicki?=
Guest
Posts: n/a
 
      09-09-2004

Użytkownik "GrantMagic" <(E-Mail Removed)> napisał w wiadomości news:(E-Mail Removed)...
> I had a similair issue.
>
> The way i got around it, was by first creating a file on the server.
> Attaching that file to the email and sending it,
> and then finally deleting the file from the server.
>
> Hope that helps


It creates lots of problems cause the attachment needs to have fixed name, same for every session.
How to avoid filenames conflicts ?
Where to write files ? ( I want to run it on Windows 2003 server)
 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      09-09-2004
Piotr,

A attachment is forever a file however not that I ever tried it, but maybe
you can do something with the memorystream?

http://msdn.microsoft.com/library/de...classtopic.asp

I really do not know if it helps

Cor




 
Reply With Quote
 
Hugo Wetterberg
Guest
Posts: n/a
 
      09-09-2004
On Thu, 9 Sep 2004 13:08:22 +0200, Piotr Wójcicki wrote:

> Użytkownik "GrantMagic" <(E-Mail Removed)> napisał w wiadomości news:(E-Mail Removed)...
>> I had a similair issue.
>>
>> The way i got around it, was by first creating a file on the server.
>> Attaching that file to the email and sending it,
>> and then finally deleting the file from the server.
>>
>> Hope that helps

>
> It creates lots of problems cause the attachment needs to have fixed name, same for every session.
> How to avoid filenames conflicts ?
> Where to write files ? ( I want to run it on Windows 2003 server)


Give the file a Guid as a name, that should resolve any potential name
conflicts. Try using isolated storage for your file (if it works for ASP)
http://www.ondotnet.com/pub/a/dotnet...edstorage.html

/Hugo
 
Reply With Quote
 
=?iso-8859-2?Q?Piotr_W=F3jcicki?=
Guest
Posts: n/a
 
      09-09-2004

Użytkownik "Hugo Wetterberg" <(E-Mail Removed)> napisał w wiadomości news:(E-Mail Removed)...

> Give the file a Guid as a name, that should resolve any potential name


How do i change Attachmets name to fixed name after creating if from file named with guid ?

Attachment.Filename property is read only.
 
Reply With Quote
 
Hugo Wetterberg
Guest
Posts: n/a
 
      09-09-2004
On Thu, 9 Sep 2004 16:27:57 +0200, Piotr Wójcicki wrote:

> Użytkownik "Hugo Wetterberg" <(E-Mail Removed)> napisał w wiadomości news:(E-Mail Removed)...
>
>> Give the file a Guid as a name, that should resolve any potential name

>
> How do i change Attachmets name to fixed name after creating if from file named with guid ?
>
> Attachment.Filename property is read only.


I guess that sort of rules out naming the file after a guid. You could
create a folder named after the session id, or a guid (overkill), and put
the uploaded file there. Then at least you have isolated the users from
each other and don't have the same concurrency problem. From here it will
be a simple matter of checking if the user already has uploaded a file with
the same name and use some naming conventions for duplicates.

/Hugo
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Email::MIME and Email::MIME::Attachment::Stripper ecureuil Perl Misc 0 05-28-2006 01:47 AM
inlining a text/plain mime attachment into email Matthew Lenz Perl 0 02-22-2005 05:39 PM
HOWTO: Send an email w/ attachment? Sam ASP .Net 1 01-28-2004 10:34 PM
Email attachment from InputStream? steven shingler ASP .Net 1 01-20-2004 06:58 AM
email as attachment Dominik Eckelt Firefox 1 12-20-2003 08:13 AM



Advertisments