Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

html to e-mail

by stu96art (Scribe)
on Mar 06, 2003 at 17:19 UTC ( #240943=perlquestion: print w/ replies, xml ) Need Help??
stu96art has asked for the wisdom of the Perl Monks concerning the following question:

I apologize for asking such a broad question, but I need to write a CGI to take information from my webpage and have it emailed to me. How can I do this? What form does the information get sent in? Any information would help, thanks.

Comment on html to e-mail
Replies are listed 'Best First'.
Re: html to e-mail
by rozallin (Curate) on Mar 06, 2003 at 17:48 UTC
    By this I am assuming you are talking about using a form to allow users to input data, and that data is sent by email to you when the users hit submit. If so, I would suggest using the module.

    Ovid has a great offsite (and free) Web Programming course that will help you to learn how to implement this, provided you know a little bit of HTML and a little bit of Perl. And if you try a Super Search for and forms, you should come up with quite a lot of nodes that deal with your query.

    Hope it helps, and good luck!

    Rozallin J. Thompson
    The Webmistress who doesn't hesitate to use strict;

Re: html to e-mail
by poj (Vicar) on Mar 06, 2003 at 17:45 UTC
    Take a look at CGI::Application::Mailform which is described as "a reusable and customizable mailform for the web. It is intentionally simple, and provides very few facilities. What it does do is provide an easy-to-use, secure system for taking the contents of a HTML form submission and sending it, via email, to a specified recipient."
Re: html to e-mail
by sutch (Curate) on Mar 06, 2003 at 17:46 UTC
    I've done this using Mail::Mailer and CGI:

    - create a new Mail::Mailer object
    - call the object's open method, passing a hash with From, To, and Subject
    - print the CGI values to the object

    See the Mail::Mailer docs for more information.

Re: html to e-mail
by thatguy (Parson) on Mar 06, 2003 at 17:47 UTC
    It depends on the format that you encode it with. If you just print the raw data to sendmail it will be a plain text email.

    However, why not take a break from the wheel rewriting and look at the nms formail? It does what you have described and I'm sure you can tweak the look of it to suit.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://240943]
Approved by rozallin
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (1)
As of 2015-10-10 20:54 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (258 votes), past polls