469,602 Members | 1,984 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

HOWTO: Send an email w/ attachment?

Sam
Hi,

I want to be able to send an email w/ attachment. I have an INPUT
Type="File" HTMLControl on the page. User selects the attachment using this
control.

That's where I'm stuck. First, I want to check to see if the user selected
an attachment. If not, I shouldn't worry about declaring and dealing w/
MailAttachment.

If there is an attachment, do I have to upload the file to the server first?
Can I grab it from the client's machine and attach it directly?

All the examples I found on the net are pretty lame. They all grab the file
from the C:\ drive. That's not a real life situation.

I'd really appreciate some examples -- preferably in C#.

Thanks,

Sam
Nov 18 '05 #1
1 1309
Sam
Is that the only way to do it? Do you then delete the file from the Temp
folder?

Sam

"Tu-Thach" <tu*****@ongtech.com> wrote in message
news:89**********************************@microsof t.com...
Sam,
I have done this in the past. What I do is upload the file to a temporary folder on the web server. Then from there, create a mail message and add
MailAttachment.
Tu-Thach

----- Sam wrote: -----

Hi,

I want to be able to send an email w/ attachment. I have an INPUT
Type="File" HTMLControl on the page. User selects the attachment using this control.

That's where I'm stuck. First, I want to check to see if the user selected an attachment. If not, I shouldn't worry about declaring and dealing w/ MailAttachment.

If there is an attachment, do I have to upload the file to the server first? Can I grab it from the client's machine and attach it directly?

All the examples I found on the net are pretty lame. They all grab the file from the C:\ drive. That's not a real life situation.

I'd really appreciate some examples -- preferably in C#.

Thanks,

Sam

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Max | last post: by
3 posts views Thread by sentiboy | last post: by
3 posts views Thread by =?Utf-8?B?SHVnaA==?= | last post: by
2 posts views Thread by =?Utf-8?B?TWlrZQ==?= | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.