Email the content of an ASP page using the email client

Discussion in 'Javascript' started by NickH, Jan 7, 2004.

  1. NickH

    NickH Guest

    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: ?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
    NickH, Jan 7, 2004
    #1
    1. Advertising

  2. In article <>,
    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: ?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
    Hywel Jenkins, Jan 7, 2004
    #2
    1. Advertising

  3. NickH

    NickH Guest

    Hywel Jenkins <> wrote in message news:<>...
    > In article <>,
    > 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: ?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 :(
    NickH, Jan 20, 2004
    #3
  4. NickH

    kaeli Guest

    OT: ASP (Re: Email the content of an ASP page using the email client)

    In article <>,
    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
    kaeli, Jan 20, 2004
    #4
  5. In article <>,
    says...
    > Hywel Jenkins <> wrote in message news:<>...
    > > In article <>,
    > > says...
    > > > <script language="JavaScript">
    > > > function mailIt()
    > > > var page = parent.QandA;
    > > > document.write 'mailto: ?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
    Hywel Jenkins, Jan 20, 2004
    #5
  6. NickH

    Brynn Guest

    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, (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: ?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!
    Brynn, Jan 20, 2004
    #6
  7. NickH

    NickH Guest

    (Brynn) wrote in message news:<>...
    > 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, (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: ?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
    NickH, Jan 22, 2004
    #7
  8. NickH

    Brynn Guest

    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, (NickH) wrote:

    > (Brynn) wrote in message news:<>...
    >> 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, (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: ?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!
    Brynn, Jan 22, 2004
    #8
  9. 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
    Thomas 'PointedEars' Lahn, Jan 22, 2004
    #9
  10. NickH

    Randy Webb Guest

    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
    Randy Webb, Jan 22, 2004
    #10
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. J.Edwards
    Replies:
    0
    Views:
    1,658
    J.Edwards
    Jan 20, 2006
  2. hazz
    Replies:
    6
    Views:
    49,411
    SkyUCHC
    Jun 9, 2010
  3. Laith Zraikat
    Replies:
    3
    Views:
    1,198
    Walter Wang [MSFT]
    Jul 6, 2006
  4. Rolf Welskes
    Replies:
    7
    Views:
    943
    Steven Cheng[MSFT]
    Aug 22, 2006
  5. Dave L
    Replies:
    3
    Views:
    3,177
    Göran Andersson
    Mar 4, 2010
Loading...

Share This Page