Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Email the content of an ASP page using the email client

Reply
Thread Tools

Email the content of an ASP page using the email client

 
 
NickH
Guest
Posts: n/a
 
      01-07-2004
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: http://www.velocityreviews.com/forums/(E-Mail 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
 
Reply With Quote
 
 
 
 
Hywel Jenkins
Guest
Posts: n/a
 
      01-07-2004
In article <(E-Mail Removed) >,
(E-Mail Removed) 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: (E-Mail 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.

--
Hywel I do not eat quiche
http://hyweljenkins.co.uk/
http://hyweljenkins.co.uk/mfaq.php
 
Reply With Quote
 
 
 
 
NickH
Guest
Posts: n/a
 
      01-20-2004
Hywel Jenkins <(E-Mail Removed)> wrote in message news:<(E-Mail Removed) et>...
> In article <(E-Mail Removed) >,
> (E-Mail Removed) 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: (E-Mail 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.



Thanks for your help. Any ideas as to what the code should be? I still
cant get it to work
 
Reply With Quote
 
kaeli
Guest
Posts: n/a
 
      01-20-2004
In article <(E-Mail Removed) >,
(E-Mail Removed) 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

 
Reply With Quote
 
Hywel Jenkins
Guest
Posts: n/a
 
      01-20-2004
In article <(E-Mail Removed) >,
(E-Mail Removed) says...
> Hywel Jenkins <(E-Mail Removed)> wrote in message news:<(E-Mail Removed) et>...
> > In article <(E-Mail Removed) >,
> > (E-Mail Removed) says...
> > > <script language="JavaScript">
> > > function mailIt()
> > > var page = parent.QandA;
> > > document.write 'mailto: (E-Mail Removed)?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
 
Reply With Quote
 
Brynn
Guest
Posts: n/a
 
      01-20-2004

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, (E-Mail Removed) (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: (E-Mail 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!
 
Reply With Quote
 
NickH
Guest
Posts: n/a
 
      01-22-2004
(E-Mail Removed) (Brynn) wrote in message news:<(E-Mail Removed)>. ..
> 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, (E-Mail Removed) (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: (E-Mail 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!



Hi Brynn

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

Nick
 
Reply With Quote
 
Brynn
Guest
Posts: n/a
 
      01-22-2004
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, (E-Mail Removed) (NickH) wrote:

>(E-Mail Removed) (Brynn) wrote in message news:<(E-Mail Removed)>. ..
>> 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, (E-Mail Removed) (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: (E-Mail 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!

>
>
>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!
 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      01-22-2004
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
 
Reply With Quote
 
Randy Webb
Guest
Posts: n/a
 
      01-22-2004
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: Only Content controls are allowed directly in a content page that contains Content controls. hazz ASP .Net 6 06-09-2010 01:54 PM
document.getElementById(), error in content page content page Dave L ASP .Net 3 03-04-2010 08:50 AM
Master-Content in Asp.net - How to set individual Head for each content page Rolf Welskes ASP .Net 7 08-22-2006 02:47 PM
Setting the Page Title using local resources for a content page in a master page Laith Zraikat ASP .Net 3 07-06-2006 01:23 AM
Error: "Content controls can only be used in a content page" J.Edwards ASP .Net 0 01-20-2006 11:43 AM



Advertisments