mailto form with attachment

using something like the code below, you can change the message subject, body, cc, etc on a mailto form.

anybody know of a way that I can also have the email attach a file from the root of the site?

mailto:name@domain.net?subject=RE:%20Your%20Subject%20has%20been%20changed

LVL 6
1cellAsked:
Who is Participating?
 
hongjunCommented:
Any progress?

hongjun
0
 
hongjunCommented:
Impossible for mailto.
Read this mailto documentation.
http://developer.iplanet.com/viewsource/husted_mailto/mailto.html


hongjun
0
 
hongjunCommented:
Below will tell you how to send email using coding.
Please note that normal HTML will not be able to achieve sending an email with attachments. In HTML we use mailto and that only restricts us in the To, Cc, Bcc, Subject and Body field. To send an email with attachments, you need to use a server-side scripting language. I will show you how to do that in Active Server Pages (ASP). That means you will need a web server.

If you are using Win NT or Win 2000 and have CDONTS.dll installed, then you can do the following using Internt Information Server (IIS) as your web server.
<%
Dim objMailer
Dim strBody

' You can have HTML tags here
' You can therefore customize the format you want to send
strBody = "<TABLE BORDER='0'><TR><TD>Hello</TD><TD>World</TD></TR></TABLE>"

Set objMailer = CreateObject("CDONTS.Newmail")
objMailer.From = "sender@domain.com"
objMailer.To = "receipent@domain.com"
objMailer.Subject = "Your subject here"
objMailer.BodyFormat = 0
objMailer.Mailformat = 0
objMailer.Body = strBody
objMailer.Send
Set objMailer = Nothing
%>

If you wish to include an attachment, below is the syntax
objNewMail.AttachFile(Source [, FileName] [, EncodingMethod] )

See this for more information on CDONTS.
http://msdn.microsoft.com/library/psdk/cdo/_denali_newmail_object_cdonts_library_.htm

If you do not have IIS because you are not running ntfs partition, then you will need to download a web server and I recommend you using Personal Web Server (PWS). Download it at http://www.microsoft.com/ntserver/nts/downloads/recommended/nt4optpk/default.asp. Note that PWS will not be able to support CDONTS.

If you are using other versions of Windows, then you got to install a server component. I recommend using AspEmail. It can be downloaded from http://www.aspemail.com
To learn how to code using the AspEmail component, you can download its user manual from the site itself. It is very comprehensive and complete. There's even an asp example page showing that.

Good Luck
hongjun
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
1cellAuthor Commented:
thanks for the quick input.  sorry I wasn't clear enough, I've been at this too long today.  let me describe my situation a bit better.

this page will be contained on a CD, not a server.  Thus, unfortunately, no server side anything will do it.  is there no client side script that can do this??????

i understand that normal HTML wouldn't do this but I am wondering if there is a way with Javascript (or other client side script) in which this could be done.

thanks again
0
 
hongjunCommented:
There's no way you can do that in client side. Perhaps you could wait for other experts to comment on this.

hongjun
0
 
1cellAuthor Commented:
well thanks for the input anyway.  i thought posting this in the HTML section would get a broader group of experts but perhaps I should post it in the javascript section.
0
 
hongjunCommented:
Simple. Post another question like this

Subject: Link to mailto question
Point: 0

Include a link to this question in the new question.


hongjun
0
 
dorwardCommented:
Don't use mailto: anyway! http://www.isolani.co.uk/newbie/mailto.html

Take a leaf out of O'reillies CD Bookshelves - put a Java webserver on the CD (then you have have a search engine too!)
0
 
MHQCommented:
1cell:

As most experts have mantioned, there is no way of doing this client side. The closest have been putting a javaserver on the CD but my guess would be that most users would object loudly to having it run on their machine possibly against their will.

My solution would be to use mailto in relular HTML and then add a comment asking the user to attach the file stating the path and name of it and some direction on how to do this in a common way for mailprogram.

/MHQ
0
 
1cellAuthor Commented:
i don't believe I'll be putting Java weberver on the cd, partly because even though I have 600MB worth of space to work from, the footprint needs to be very economic.  I also fear the possibilities of running the server on unknown environment variables as well as the fact the point which was made that some people might not feel safe running a server, even temporarily.

thanks for all the input regardless.  It baffles me that there's no way to do this.  I was always taught, "anything you wanna do."  I suppose it's true but not on a static page.  
0
 
MHQCommented:
I think the saying goes "anything you wanna do, you can do... but you'll have to sell your soul for some of it" =)
0
 
1cellAuthor Commented:
i've accepted hongjun's cmoments as an answer simply because he was the first one to say, "you can't" and still stuck around to try to help.  I appreciate everyone else's help too.

0
 
1cellAuthor Commented:
if I sell my soul can I do it on a static page?  what if I already sold it?  can I sell my mojo?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.