470,644 Members | 1,204 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,644 developers. It's quick & easy.

Email the content of an ASP page using the email client

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: se******@example.com?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
Jul 20 '05 #1
9 1508
In article <7d**************************@posting.google.com >,
ni*********@hotmail.com says...
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: se******@example.com?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.

--
Hywel I do not eat quiche
http://hyweljenkins.co.uk/
http://hyweljenkins.co.uk/mfaq.php
Jul 20 '05 #2
Hywel Jenkins <hy**********@hotmail.com> wrote in message news:<MP************************@news.individual.n et>...
In article <7d**************************@posting.google.com >,
ni*********@hotmail.com says...
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: se******@example.com?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.

Thanks for your help. Any ideas as to what the code should be? I still
cant get it to work :(
Jul 20 '05 #3
In article <7d**************************@posting.google.com >,
ni*********@hotmail.com enlightened us with...
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.

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

Jul 20 '05 #4
In article <7d**************************@posting.google.com >,
ni*********@hotmail.com says...
Hywel Jenkins <hy**********@hotmail.com> wrote in message news:<MP************************@news.individual.n et>...
In article <7d**************************@posting.google.com >,
ni*********@hotmail.com says...
<script language="JavaScript">
function mailIt()
var page = parent.QandA;
document.write 'mailto: se******@example.com?subject=The
document&Attachment=';
document.write page;
}
</script>

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 :(


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.

--
Hywel I do not eat quiche
http://hyweljenkins.co.uk/
http://hyweljenkins.co.uk/mfaq.php
Jul 20 '05 #5

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


On 7 Jan 2004 07:18:52 -0800, ni*********@hotmail.com (NickH) wrote:
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: se******@example.com?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!
Jul 20 '05 #6
z@z.com (Brynn) wrote in message news:<40**************@news.comcast.giganews.com>. ..
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


On 7 Jan 2004 07:18:52 -0800, ni*********@hotmail.com (NickH) wrote:
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: se******@example.com?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!

Hi Brynn

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

Nick
Jul 20 '05 #7
Checkout the microsoft.public.inetserver.asp.general group for a post
called ... Email_Handler.asp

It will be up in a few minutes

Brynn


On 21 Jan 2004 23:59:17 -0800, ni*********@hotmail.com (NickH) wrote:
z@z.com (Brynn) wrote in message news:<40**************@news.comcast.giganews.com>. ..
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


On 7 Jan 2004 07:18:52 -0800, ni*********@hotmail.com (NickH) wrote:
>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: se******@example.com?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!

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!
Jul 20 '05 #8
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.)
PointedEars
Jul 20 '05 #9
Thomas 'PointedEars' Lahn wrote:
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.

--
Randy
Chance Favors The Prepared Mind

Jul 20 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by lucanos | last post: by
reply views Thread by James Hong | last post: by
88 posts views Thread by Mike | last post: by
5 posts views Thread by Das | last post: by
7 posts views Thread by Martin | last post: by
3 posts views Thread by anu b | last post: by
1 post views Thread by Korara | last post: by
reply views Thread by warner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.