Click to See Complete Forum and Search --> : email with attachment from client side


swaroopbhave
June 21st, 2008, 07:56 AM
hi every one,
Question:
i want to code a webpage,so that the customer for website can recieve the files attached by the user directly to his email address.
i.e.say i want to send email to address:customer@mail.com
which include an attachment,attached by the user say,test.doc


Problem:
obviously user will attach files from his desktop,thats were the problem lies,
gives me the error:cannot find file test.doc

i searched on Net,and came to conclusion that problem might be because
asp.net code is a server side code,so it cannot access files from client machine while its execution on server side.

so Is this so?Do i have to store that test.doc on my server and then attach?
but that destroys my whole motive of saving my server space
So,
please let me know the correct method to do that,
Note:i can send simple mails(without any attachment) successfully

Thanks in advance,waiting for your precious reply

Rohit Kukreti
June 24th, 2008, 05:21 AM
You need to upload the test.doc from client side to your server. For further info check the below links

http://msdn.microsoft.com/en-us/library/aa479405.aspx
http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/standard/fileupload.aspx
http://www.4guysfromrolla.com/webtech/091201-1.shtml