471,071 Members | 1,357 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,071 software developers and data experts.

email attachment from string

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
Nov 18 '05 #1
6 2037
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:ch**********@nemesis.news.tpi.pl...
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
Nov 18 '05 #2

Użytkownik "GrantMagic" <gr***@magicalia.com> napisał w wiadomości news:uL*************@TK2MSFTNGP09.phx.gbl...
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)
Nov 18 '05 #3
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


Nov 18 '05 #4
On Thu, 9 Sep 2004 13:08:22 +0200, Piotr Wójcicki wrote:
Użytkownik "GrantMagic" <gr***@magicalia.com> napisał w wiadomości news:uL*************@TK2MSFTNGP09.phx.gbl...
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
Nov 18 '05 #5

Użytkownik "Hugo Wetterberg" <hu*************@smi.mas.lu.se> napisał w wiadomości news:1n*****************************@40tude.net...
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.
Nov 18 '05 #6
On Thu, 9 Sep 2004 16:27:57 +0200, Piotr Wójcicki wrote:
Użytkownik "Hugo Wetterberg" <hu*************@smi.mas.lu.se> napisał w wiadomości news:1n*****************************@40tude.net...
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
Nov 18 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by MikeM | last post: by
1 post views Thread by Jeff S via AccessMonster.com | last post: by
3 posts views Thread by =?Utf-8?B?SHVnaA==?= | last post: by
7 posts views Thread by erikcw | last post: by
1 post views Thread by budyerr | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.