Reply
how to upload file attahcment to email
Old 03-28-2006, 03:40 AM how to upload file attahcment to email
Average Talker

Posts: 26
Trades: 0
Hi guys,
I just joined this forum few minutes ago and hope you can help me. I am looking for a simple example to see how I can upload a file and email it as an attachment. I have been searching on internet for few hours but no luck. Can you help me on this?it is so werid that I didn't find any thing!!!

Many thanks,
Elham
elham is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 03-28-2006, 03:44 AM Re: how to upload file attahcment to email
kila's Avatar
Skilled Talker

Posts: 51
Trades: 0
Which mail provider are you using?Just click on attach file and send.
kila is offline
Reply With Quote
View Public Profile Visit kila's homepage!
 
Old 03-28-2006, 03:45 AM Re: how to upload file attahcment to email
chrishirst's Avatar
Super Moderator

Posts: 22,260
Location: Blackpool. UK
Trades: 0
what mail and upload components are you using ?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-28-2006, 03:48 AM Re: how to upload file attahcment to email
Average Talker

Posts: 26
Trades: 0
Acually I am really new in ASP and don't know exactly the answer but I know in server ASP is on and I know the mail server as well. how can I figure out what mail and upload components I have to use? sorry if I am very new
elham is offline
Reply With Quote
View Public Profile
 
Old 03-28-2006, 03:57 AM Re: how to upload file attahcment to email
Average Talker

Posts: 26
Trades: 0
Can I use ASPupload?
elham is offline
Reply With Quote
View Public Profile
 
Old 03-28-2006, 04:10 AM Re: how to upload file attahcment to email
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
If possible, switch to ASP.NET - you won't need to use mail components or third party upload components - it's all included in the framework, and is a lot easier to use.
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"
Inoxia Pyrotechnics Supplies | Surrey Angels Cheerleading Squad
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 03-28-2006, 04:17 AM Re: how to upload file attahcment to email
Average Talker

Posts: 26
Trades: 0
HI Minaki,
I don't know ASP.net and I just want to do it with ASP and see a simple example to see how I can do it. do you have a simple example with ASP to show how to email a form with file attachment? that's all I need still I am searching no luck

Thanks for your help,
Elham
elham is offline
Reply With Quote
View Public Profile
 
Old 03-28-2006, 06:13 AM Re: how to upload file attahcment to email
chrishirst's Avatar
Super Moderator

Posts: 22,260
Location: Blackpool. UK
Trades: 0
Quote:
Originally Posted by elham
Can I use ASPupload?
Yes, if it is installed on the server
You need to find what components you can use (that the host has installed) first.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-28-2006, 06:17 AM Re: how to upload file attahcment to email
chrishirst's Avatar
Super Moderator

Posts: 22,260
Location: Blackpool. UK
Trades: 0
try http://www.asp101.com/samples/viewas...5Fattach%2Easp or http://www.w3schools.com/asp/asp_send_email.asp

both using CDOSYS (Win2k and Win 2003)
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-28-2006, 02:28 PM Re: how to upload file attahcment to email
Average Talker

Posts: 26
Trades: 0
Thank you much for the big help. I will try and let you know but before trying if I want to let user browse the folders and choose a file to attach what should I do? since in the code the path and file already is in there.

Thanks,
Elham
elham is offline
Reply With Quote
View Public Profile
 
Old 03-28-2006, 07:02 PM Re: how to upload file attahcment to email
Average Talker

Posts: 26
Trades: 0
Hi guys,
I finally found an example but although it seems fine but it doesn't work and when you click on submit it gets page not found, but URL shows "JmailUploadAutoFormProcess.asp" has been
http://webdev.stecs.com/contact/Jmai...ormProcess.asp

ant idea what part I am missing?

Thanks,
Elham

-------------------Form------------------------
<%
Set upload = Server.CreateObject ( "w3.Upload" )
Set JMail = Server.CreateObject("JMail.SMTPMail")
' Check for attachments and add them to the email
' all other form elements are added to the body of the email
for i = 0 to upload.form.count-1
if upload.form(i).isFile then
set attachment = upload.Form(i)
JMail.AddCustomAttachment attachment.filename, attachment.item
else
JMail.appendtext(upload.form(i).name & ": " & upload.form(i).item & vbcrlf)
end if
next
' Get the form variables, using the upload object
Name = upload.Form("name")
SenderEmail = upload.Form("email")
Subject = "Regarding " & upload.Form ("subject")
Recipient = upload.Form("recipient")
' Below you should enter your own SMTP- server
JMail.ServerAddress = "stecs-exchange.stecs.com"
JMail.Sender = Senderemail
JMail.Subject = Subject
JMail.AddRecipient Recipient
JMail.Priority = 3
JMail.Execute
%>
<html>
<head>
<title>Dimac</title>
</head>
<body>
<BR>
<BR>
<p align="center"><font face="Arial, geneva" size="5">
eMail sent </font></p>
<center>
<font face="Arial, geneva" size="3">
Your email has been sent to <%= Recipient %><br>
<BR>
<BR>
<BR>
</font>
</center>
</body>
</html>
elham is offline
Reply With Quote
View Public Profile
 
Old 03-29-2006, 03:22 AM Re: how to upload file attahcment to email
chrishirst's Avatar
Super Moderator

Posts: 22,260
Location: Blackpool. UK
Trades: 0
we need the full error message
assuming Internet Explorer use;

Tools -> Internet Options -> Advanced tab -> scroll to Browsing and uncheck "Show friendly HTTP error messages".

are the components (W3 Upload and JMail) you are tring to use installed on the server ?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-29-2006, 05:08 PM Re: how to upload file attahcment to email
Average Talker

Posts: 26
Trades: 0
Ooops no got it thanks.
Elham
elham is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to how to upload file attahcment to email
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.16418 seconds with 13 queries