sending mail using javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Obscurr

    sending mail using javascript

    hi

    I'm would like my app to send a preformatted email(with subject and
    body) everytime a user pushed a button, like : onclick "
    mailto:this@tha t.com" , without the user seeing anything, i.e. not
    being able to edit the message.

    Using php, this is very simple; mail("this@exam ple.com", "Subject",
    "Line 1\nLine 2\nLine 3");

    is there a way to do this the same, easy way using javascript?


    obscurr
  • Lasse Reichstein Nielsen

    #2
    Re: sending mail using javascript

    obscurr@hotmail .com (Obscurr) writes:
    [color=blue]
    > I'm would like my app to send a preformatted email(with subject and
    > body) everytime a user pushed a button, like : onclick "
    > mailto:this@tha t.com" , without the user seeing anything, i.e. not
    > being able to edit the message.[/color]
    [color=blue]
    > is there a way to do this the same, easy way using javascript?[/color]

    No. Plain Javascript has no networking ability besides what the
    browser provides. You can make the browser fetch an URL, and that is
    about it.

    Using the mailto: protocol requires the user to have set up a mail
    client, and will usually open that client for him to see and approve.

    When you think about it, if what you want was possible, you could make
    a page that sends spam mail every time someone visits it ... without
    him even being aware.

    /L
    --
    Lasse Reichstein Nielsen - lrn@hotpop.com
    Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
    'Faith without judgement merely degrades the spirit divine.'

    Comment

    • Stuart Palmer

      #3
      Re: sending mail using javascript

      Best way to do mailing is serverside as mailto loads up your default mail
      client in browsers like NS and even worse message if you don't have a
      default set up.
      So, as I said, best way is server side.

      Stu

      "Obscurr" <obscurr@hotmai l.com> wrote in message
      news:4452c409.0 308260523.2ae71 308@posting.goo gle.com...[color=blue]
      > hi
      >
      > I'm would like my app to send a preformatted email(with subject and
      > body) everytime a user pushed a button, like : onclick "
      > mailto:this@tha t.com" , without the user seeing anything, i.e. not
      > being able to edit the message.
      >
      > Using php, this is very simple; mail("this@exam ple.com", "Subject",
      > "Line 1\nLine 2\nLine 3");
      >
      > is there a way to do this the same, easy way using javascript?
      >
      >
      > obscurr[/color]


      Comment

      • Hywel Jenkins

        #4
        Re: sending mail using javascript

        In article <4452c409.03082 60523.2ae71308@ posting.google. com>,
        obscurr@hotmail .com says...[color=blue]
        > hi
        >
        > I'm would like my app to send a preformatted email(with subject and
        > body) everytime a user pushed a button, like : onclick "
        > mailto:this@tha t.com" , without the user seeing anything, i.e. not
        > being able to edit the message.
        >
        > Using php, this is very simple; mail("this@exam ple.com", "Subject",
        > "Line 1\nLine 2\nLine 3");
        >
        > is there a way to do this the same, easy way using javascript?
        >[/color]
        Yes - do you have server-side JavaScript or ASP with JavaScript?

        --
        Hywel

        Comment

        • Obscurr

          #5
          Re: sending mail using javascript

          Hywel Jenkins <hyweljenkins@h otmail.com> wrote in message news:<MPG.19b5b 29b31b38a998968 0@news.individu al.net>...[color=blue]
          > In article <4452c409.03082 60523.2ae71308@ posting.google. com>,
          > obscurr@hotmail .com says...[color=green]
          > > hi
          > >
          > > I'm would like my app to send a preformatted email(with subject and
          > > body) everytime a user pushed a button, like : onclick "
          > > mailto:this@tha t.com" , without the user seeing anything, i.e. not
          > > being able to edit the message.
          > >
          > > Using php, this is very simple; mail("this@exam ple.com", "Subject",
          > > "Line 1\nLine 2\nLine 3");
          > >
          > > is there a way to do this the same, easy way using javascript?
          > >[/color]
          > Yes - do you have server-side JavaScript or ASP with JavaScript?[/color]
          yes I have server-side Javascript. How do I progress?

          obscurr

          Comment

          Working...