Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rating: Thread Rating: 4 votes, 2.25 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-10-2002, 08:40 AM   PM User | #1
RichardE
New Coder

 
Join Date: Oct 2002
Location: UK
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
RichardE is an unknown quantity at this point
How to add Attachment to Mailto

My mailto script works fine - but how can I add an attachment to the email?
RichardE is offline   Reply With Quote
Old 11-10-2002, 11:57 AM   PM User | #2
joh6nn
wei wu wei


 
joh6nn's Avatar
 
Join Date: Jun 2002
Location: 72° W. 48' 57" , 41° N. 32' 04"
Posts: 1,887
Thanks: 0
Thanked 1 Time in 1 Post
joh6nn is an unknown quantity at this point
i'm assuming that when you say "Mailto script" what you mean, is a form that has it's action set to "mailto:someguy@someplace.com".

if that's the case, then see the following link for a nice little tutorial on how to do this: http://www.htmlgoodies.com/attachp2.html

if that's not what you're talking about, then you're going to have to provide some actual details.

hope that helps

ps: as with your other post, because i don't think that this is going to have anything to do with javascript, i'm moving it to the HTML & CSS forum
__________________
bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

i am a loser geek, crazy with an evil streak,
yes i do believe there is a violent thing inside of me.

Last edited by joh6nn; 11-10-2002 at 01:19 PM..
joh6nn is offline   Reply With Quote
Old 11-10-2002, 03:55 PM   PM User | #3
RichardE
New Coder

 
Join Date: Oct 2002
Location: UK
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
RichardE is an unknown quantity at this point
Thanks for the link to HTML Goodies - they have some interesting bits - but I can't figure out the mailto.

This is the line of code that I want to send a file with -

document.writeln('<a href="mailto:?subject=Pictures from PhotoAlbum&cc= &body=This is the body text&attachment='+filetosend+'">Email</a><br>');

It works fine and creates the email - until I try and add the attachment.

This is also where I want to break up the body text with carriage returns.

Thanks in advance!
RichardE is offline   Reply With Quote
Old 11-10-2002, 04:10 PM   PM User | #4
joh6nn
wei wu wei


 
joh6nn's Avatar
 
Join Date: Jun 2002
Location: 72° W. 48' 57" , 41° N. 32' 04"
Posts: 1,887
Thanks: 0
Thanked 1 Time in 1 Post
joh6nn is an unknown quantity at this point
ok, the only way i know of, to send a file, without using a server side script, is the way listed in the HTML Goodies page.

as far as getting line breaks into the body, i'll post the answer to that, in the other thread.
__________________
bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

i am a loser geek, crazy with an evil streak,
yes i do believe there is a violent thing inside of me.
joh6nn is offline   Reply With Quote
Old 11-12-2002, 09:01 PM   PM User | #5
RichardE
New Coder

 
Join Date: Oct 2002
Location: UK
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
RichardE is an unknown quantity at this point
Help - I can't get this to work - it brings up the email program (Outlook) and puts in the subject and body text - but no attachment!

document.writeln('<a href="mailto:?subject=Pictures from PhotoAlbum&cc= &body=This is the body text&attachment='+mFiletosend+'">Email</a><br>');

mFiletosend is the path and filename - it looks OK in the status bar and it is the same as I use to display the image on screen.

Does Outlook need more of an address to find it?

Any ideas?
RichardE is offline   Reply With Quote
Old 11-12-2002, 09:51 PM   PM User | #6
zoobie
Senior Coder

 
Join Date: Jun 2002
Location: ColoRockyz
Posts: 1,642
Thanks: 1
Thanked 0 Times in 0 Posts
zoobie has a little shameless behaviour in the past
Quote:
HTML Goodies:

"I was successful with text-based documents like HTML. Word files and images never did come through correctly. They seemed to attach and send just fine, but would be destroyed when they arrived in my e-mail box."
Sorry, but I've never seen this question answered. I'd just use a cgi/asp/php script without all the annoying prompts. Much quicker and efficient, too.

Try finding an OE forum at Microsoft or Tek-Tips.
__________________
Zoobie or not Zoobie...That is the problem.
<body onUnload="flush( ! )">

Last edited by zoobie; 11-12-2002 at 10:03 PM..
zoobie is offline   Reply With Quote
Old 11-12-2002, 10:35 PM   PM User | #7
whammy
Senior Coder

 
Join Date: Jun 2002
Location: 41° 8' 52" N -95° 53' 31" W
Posts: 3,660
Thanks: 0
Thanked 0 Times in 0 Posts
whammy is an unknown quantity at this point
Also, trying to format the body of a message using "mailto" is problematic, because Outlook Express is buggy using "mailto" in more than one way.

The only way (as joh6nn said) to reliably do either one (attachment or formatting) is to use a server-side language.

__________________
Former ASP Forum Moderator - I'm back!

If you can teach yourself how to learn, you can learn anything. ;)
whammy is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 05:16 PM.


Advertisement
Log in to turn off these ads.