Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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
Re: html to e-mail
by poj (Priest) 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."
    poj
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.
    -phill

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 CGI.pm 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 CGI.pm 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;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2014-09-19 13:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (138 votes), past polls