Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   HOWTO: Send an email w/ attachment? (http://www.velocityreviews.com/forums/t71755-howto-send-an-email-w-attachment.html)

Sam 01-28-2004 09:49 PM

HOWTO: Send an email w/ attachment?
 
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



Sam 01-28-2004 10:34 PM

Re: HOWTO: Send an email w/ attachment?
 
Is that the only way to do it? Do you then delete the file from the Temp
folder?

Sam

"Tu-Thach" <tuthach@ongtech.com> wrote in message
news:8957E1A5-2462-47A1-83BB-959FADA8249A@microsoft.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
>
>
>





All times are GMT. The time now is 09:56 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57