We help IT Professionals succeed at work.

add attachment to the mailto: syntax

jayyu2k
jayyu2k asked
on
Hi

u all have seen this

 <a href="mailto:me@me.com?subject="helo">mail</a>

I just want to know if we can add another attribute like the subject . I want to attach a file too that is on the client.

once the mail button is clicked outlook is to be opened with to as me@me.com subject as "helo" and attach as "somefil.txt" which is on the client
Comment
Watch Question

You can't..

Besides, I should really advice against using the mailto attribute when you want to send mail using a link...

The reason why there is no option to attach a file using the mailto way of sending email, is because normally you would not know if the file is on the client, and where....

Even if you do know where the file is, it is concidered a huge security breach, because that way you could have a user send a file without even knowing about it, and that could be a file that contains vital information...

Just my thoughts, do with them what you like...

If you want to use attachments you will need to create a form, have the user select the file that needs to be attached (you cannot do that for them, the input type=file is readonly) and have a server side script process the form, create a connection to the mail component and add the attachment there....

I hope this helps,

Max.

Commented:
I'm looking for a way to do the mailto: attachment too.  Here's why:  I've created a floppy disk with a flash movie on it.  At the end, I want to allow the user to "email this movie to a friend".  I know the location will always be "A:/movie.exe".  Can you think of another way to do this?
Bill

Author

Commented:
WEll i am deleting the Q :) as i found to be of no use.

Commented:
How do you know the location will always be a:/movie.exe?

If I were to try it then the location would be file:///mnt/floppy/movie.exe
Yes I can think of another way to do this...

With a server side script and for example the CDONTS.NewMail object...

jayyu2k > delete this question? Why? Because you didn't get the answer you were hoping for? Sometimes the answer is that what you want cannot be done, that doesn't make it a bad answer....

Max.

Author

Commented:
DreamMaster i mean my Q had no possibility of being solved but had as possibility of creating confusions. Thats why i del it.Moreover i never said u gave a Bad answer??
"that doesn't make it a bad answer...." ?? why did u feel so! ! :) cheers

Author

Commented:
had a possibility of creating confusions--> i mean :) sorry
Now you are confusing me...

I do not feel like I gave a bad answer, because I know I didn't...

But how can your question create confusions? If you ask for a solution and the answer is that it cannot be done...I do not think that this is confusing to other people...it's clear enough for me...

Oh well...go ahead and delete it, but as an example "lucid7" was looking for the same thing...now he/she knows that it cannot be done with the mailto... he wouldn't have known otherwise now would he?

Max.

Commented:
ah Dorward, I stand corrected.  I'm very windows centric.  and to all: a little confusion is good.  shakes things up, I say.

Commented:
Lucid

One possible answer for you is to also have your flash movie on the web somewhere.

You could then use mailto: to direct new users to the web site, which could have a download option if required.

Just a though

Mark
Top Expert 2013

Commented:
This question has been abandoned.  I will make a recommendation to the
moderators on its resolution in a week or two.  I appreciate any comments
that would help me to make a recommendation.

Cd&
Eventhough jayyu2k says it was a question that never had a chance of getting solved I believe I provided him with an answer, which is that it cannot be done...it may not be what he wanted to hear...but it's still the answer...

Max.
Top Expert 2013

Commented:
It is time to clean this abandoned question up.  

I am putting it on a clean up list for CS.

<recommendation>
points to DreamMaster
</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&
Comment from DreamMaster accepted as answer.

Thank you
Computer101
Community Support Moderator
I keep saying thanks here...Thanks Computer101 :)

Max.