email attachment from string

  • Thread starter =?iso-8859-2?Q?Piotr_W=F3jcicki?=
  • Start date
?

=?iso-8859-2?Q?Piotr_W=F3jcicki?=

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
 
G

GrantMagic

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

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


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
 
?

=?iso-8859-2?Q?Piotr_W=F3jcicki?=

U¿ytkownik "GrantMagic said:
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)
 
?

=?iso-8859-2?Q?Piotr_W=F3jcicki?=

U¿ytkownik "Hugo Wetterberg said:
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.
 
H

Hugo Wetterberg

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top