Email the content of an ASP page using the email client

N

NickH

Hi,

Thanks in advance for any help you can provide. I have a frameset and
one of the frames contains a page that is created on the fly, an
actual word document. I want to have a button in one of the other
frames that emails this created page as an email attachment using the
email client (outlook or whatever). I created a function as follows:

<script language="JavaScript">
function mailIt()
var page = parent.QandA;
document.write 'mailto: (e-mail address removed)?subject=The
document&Attachment=';
document.write page;
}
</script>
Which is then called from a button, but it doesnt work! QandA is the
name of the frame that contains the document I want to email as the
attachment. Can anyone help please??!
Thanks
 
H

Hywel Jenkins

Hi,

Thanks in advance for any help you can provide. I have a frameset and
one of the frames contains a page that is created on the fly, an
actual word document. I want to have a button in one of the other
frames that emails this created page as an email attachment using the
email client (outlook or whatever). I created a function as follows:

<script language="JavaScript">
function mailIt()
var page = parent.QandA;
document.write 'mailto: (e-mail address removed)?subject=The
document&Attachment=';
document.write page;
}
</script>
Which is then called from a button, but it doesnt work! QandA is the
name of the frame that contains the document I want to email as the
attachment. Can anyone help please??!

Use a server-side process to do it. Your example mailto: code above is
faulty.
 
N

NickH

Hywel Jenkins said:
Use a server-side process to do it. Your example mailto: code above is
faulty.


Thanks for your help. Any ideas as to what the code should be? I still
cant get it to work :(
 
K

kaeli

Thanks for your help. Any ideas as to what the code should be? I still
cant get it to work :(

Do you have ASP CDONTS?
http://www.codefixer.com/tutorials/email_cdonts.asp

Any more questions on ASP should be directed to the ASP groups over at
msnews.microsoft.com.

If you have JSP or PHP, I have code to mail with either of those, too.

--
--
~kaeli~
A little rudeness and disrespect can elevate a meaningless
interaction to a battle of wills and add drama to an
otherwise dull day.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
 
H

Hywel Jenkins

Thanks for your help. Any ideas as to what the code should be? I still
cant get it to work :(

You can't add a subject and an attachment with mailto - just set the
recipient. I have no idea what the ASP code for a form handler that
would suit you, but you're barking way up the wrong tree with what
you've got.
 
B

Brynn

Do you have a mail component available to you on your server ... such
as ASPEmail, CDONTs, or something ... if so, tell me, and I will
supply you with a subroutine to use for the email.

Brynn
www.coolpier.com




Hi,

Thanks in advance for any help you can provide. I have a frameset and
one of the frames contains a page that is created on the fly, an
actual word document. I want to have a button in one of the other
frames that emails this created page as an email attachment using the
email client (outlook or whatever). I created a function as follows:

<script language="JavaScript">
function mailIt()
var page = parent.QandA;
document.write 'mailto: (e-mail address removed)?subject=The
document&Attachment=';
document.write page;
}
</script>
Which is then called from a button, but it doesnt work! QandA is the
name of the frame that contains the document I want to email as the
attachment. Can anyone help please??!
Thanks

Brynn
www.coolpier.com

I participate in the group to help give examples of code.
I do not guarantee the effects of any code posted.
Test all code before use!
 
N

NickH

Do you have a mail component available to you on your server ... such
as ASPEmail, CDONTs, or something ... if so, tell me, and I will
supply you with a subroutine to use for the email.

Brynn
www.coolpier.com






Brynn
www.coolpier.com

I participate in the group to help give examples of code.
I do not guarantee the effects of any code posted.
Test all code before use!


Hi Brynn

The server has the CDONTS mail component. Thanks for any help!

Nick
 
B

Brynn

Checkout the microsoft.public.inetserver.asp.general group for a post
called ... Email_Handler.asp

It will be up in a few minutes

Brynn






Hi Brynn

The server has the CDONTS mail component. Thanks for any help!

Nick

Brynn
www.coolpier.com

I participate in the group to help give examples of code.
I do not guarantee the effects of any code posted.
Test all code before use!
 
T

Thomas 'PointedEars' Lahn

Hywel said:
You can't add a subject and an attachment with mailto [...]

In fact, you *can* add a Subject, that header is believed to
be safe along with Keywords and Body:

http://www.ietf.org/rfc/rfc2368.txt

The problem is buggy implementations. You are right for the
attachment, however, and thus the server-side app is the best
bet (not to mention people who do not use a mail client whose
numbers are apparently increasing.)


PointedEars
 
R

Randy Webb

Thomas said:
Hywel Jenkins wrote:

You can't add a subject and an attachment with mailto [...]


In fact, you *can* add a Subject, that header is believed to
be safe along with Keywords and Body:

http://www.ietf.org/rfc/rfc2368.txt

The problem is buggy implementations. You are right for the
attachment, however, and thus the server-side app is the best
bet (not to mention people who do not use a mail client whose
numbers are apparently increasing.)

And its the lack of a default mail client that will cause mailto: to be
as unreliable as it is. Of all the browsers I have installed, the only
one that has a default mail client is AOL and thats because I can't
disable it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top