How can I make an always working mailform with java?

Discussion in 'Javascript' started by JohnK, Jun 10, 2004.

  1. JohnK

    JohnK Guest

    Hi all,

    This is my first time visiting this group. I already tried two other java
    groups, but those aren't very populated.
    I don't know if it is the right one, otherwise please tell me in which
    group I have to put me question.
    And yes I know that I'm multiposting, crossposting or whatever. Reason is
    that I saw this group (comp.lang.javascript) later.

    Well the question is as follows:
    I need a simple mailform. I know how to make an html-form, but I don't want
    to use
    the most easy solution in html with mailto:. Everyone knows that gives you
    more spam than you would like...
    The form contains some text, three fields to be filled in:
    1) name
    2) e-mail address (for replies etc) and
    3) a text-area for comment and questions
    Furthermore a Transmit or Submit button. A Reset or Erase button is welcome,
    but not neccessary.

    I had a form using CGI-bin from my provider, but it fails somehow, so I
    decided to use something different. I tried PHP, but my provider does not
    support that. The only thing I can use is Html and Java.
    I tried something with Java, but what I have now is not what I want, it
    starts user's e-mail program and than fills in the 'to', 'from', 'subject'
    and textbody. User still has to click the sent button. BUT, what happens
    when user doesn't have a mail program on his machine? Or is using an exotic,
    non 'standard', program?

    I searched a lot on the web, maybe not on the right places, but all I found
    are examples with far more functionality then what I need. I don't want
    radiobuttons, checkboxes.

    Could any of you help me? With an example or link?

    Thanks in advance
    John




    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.701 / Virus Database: 458 - Release Date: 7-6-2004
    JohnK, Jun 10, 2004
    #1
    1. Advertising

  2. JohnK wrote:

    > This is my first time visiting this group. I already tried two other java
    > groups, but those aren't very populated.


    JavaScript has nothing to do with Java.
    http://jibbering.com/faq/#FAQ2_2

    > I need a simple mailform. I know how to make an html-form, but I don't
    > want to use
    > the most easy solution in html with mailto:. Everyone knows that gives you
    > more spam than you would like...


    This doesn't work anyway: http://www.isolani.co.uk/articles/mailto.html

    > I had a form using CGI-bin from my provider, but it fails somehow, so I
    > decided to use something different.


    That is rather vague. I'd suggest you ask your provider for support.

    > I tried PHP, but my provider does not
    > support that. The only thing I can use is Html and Java.
    > I tried something with Java, but what I have now is not what I want, it
    > starts user's e-mail program and than fills in the 'to', 'from', 'subject'
    > and textbody. User still has to click the sent button. BUT, what happens
    > when user doesn't have a mail program on his machine? Or is using an
    > exotic, non 'standard', program?


    Like Hotmail, GMail or Yahoo! mail? Those are pretty common. I don't think
    any email client can be considered "standard".

    You need something on the server. Client side JavaScript isn't going to cut
    it, nor is client side Java (well, if you can persude the user to download
    an applet containing your own SMTP client (probably requiring them to
    upgrade their Java Plugin along the way), and outgoing SMTP isn't blocked
    from their network[1], and incoming mail from dynamically assigned ip
    addresses isn't blocked from your server - then you might be able to do it)

    > I searched a lot on the web, maybe not on the right places, but all I
    > found are examples with far more functionality then what I need. I don't
    > want radiobuttons, checkboxes.


    The content of the form is not relevent. The only safe way to get form data
    to email is to submit it over http and have a script running on your server
    deal with it.

    [1] Except for specific, designated mail servers.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Jun 10, 2004
    #2
    1. Advertising

  3. JohnK

    kaeli Guest

    In article <40c8a3b3$0$767$>,
    enlightened us with...
    > Hi all,
    >
    > This is my first time visiting this group. I already tried two other java
    > groups, but those aren't very populated.

    <snip>

    java != javascript.

    > Could any of you help me? With an example or link?
    >


    Why don't you just use one of the free ones?

    Although, if you have a cgi-bin, it's REALLY easy to make one in Perl.
    I can't program in Perl very well and I did one. *g*
    There's a bunch of free scripts on the web, too.
    Even better, if your server has a cgi-bin, they probably support
    formmail (perl). Ask them.
    If the one you were using failed, it's probably something simple. What
    fails? Is there an error given?

    Mailing a form requires something on the server if you're to avoid the
    nasty mailto. Javascript, generally speaking, runs on the client.

    If you really meant that your host supports java servlets, let me know.
    If they have javamail or smtp mail, I can make you a quick servlet to
    mail a form. I've already got a JSP page that uses smtp mail to do that.

    --
    --
    ~kaeli~
    Black holes were created when God divided by 0.
    http://www.ipwebdesign.net/wildAtHeart
    http://www.ipwebdesign.net/kaelisSpace
    kaeli, Jun 10, 2004
    #3
    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. Deryck
    Replies:
    4
    Views:
    517
    derek giroulle
    Jun 22, 2004
  2. joes
    Replies:
    2
    Views:
    1,005
    Daniel Pitts
    May 25, 2007
  3. Vikram
    Replies:
    4
    Views:
    521
    Vikram
    Jun 13, 2008
  4. Christopher Brandsdal

    Error in mailform

    Christopher Brandsdal, Jan 21, 2004, in forum: ASP General
    Replies:
    16
    Views:
    225
    Roland Hall
    Jan 23, 2004
  5. Gert-Jan van Middelkoop

    E-mailform with subject

    Gert-Jan van Middelkoop, Dec 22, 2003, in forum: Javascript
    Replies:
    3
    Views:
    103
Loading...

Share This Page