in reply to sending email through cgi

There are many, many modules on CPAN that can do what you want, but I strongly suggest that you read up on the various security problems you can introduce if you are not familiar with web-based email.

It helps to remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.

Replies are listed 'Best First'.
Re^2: sending email through cgi
by AdrianJ217 (Novice) on May 18, 2014 at 19:49 UTC

    Hi, yeah I have tried several modules but there was no success. For the Mail::Sendmail module, after I did a test on the contact form and pressed "send" I got this response: Can't locate Mail/Sendmail.pm in @INC (@INC contains: /private/software/lib/perl5/site_perl/5.8.8/ /private/software/lib/perl5/5.8.8/ /private/software/lib64/perl5/5.\8.8/ /private/software/lib/perl5/x86_64-linux-thread-multi /private/software/lib/perl5/5.8.8 /private/software/lib/perl5/x86_64-linux-thread-multi /private/software/lib/perl5 /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /home/ls/adrian/public_html/cgi-bin/contact.cgi line 7. BEGIN failed--compilation aborted at /home/ls/adrian/public_html/cgi-bin/contact.cgi line 7.

      If you happen to be on a Linux box, then you might find it easiest to use the sendmail command (or alternative).

      Perl doesn't have email capabilities built in, so it's recommended to install a module for this if you don't already have one installed. This has become quite easy with cpanminus.

        Greetings, AdrianJ217.

        It's difficult to provide detailed responses, without more information from you. But w/o that information;
        On a UNIX-ish platform:

        # see if sendmail exists, and where it's located $ which sendmail
        if true, you will be able to use, or create a Module that utilizes the capabilities that the Sendmail MTA provides; else, discover the installed MTA, and if any, what it provides.
        Do note, as has been rightfully noted in other replies; you run quite a risk, providing an email form in the wild. If abused, or not properly secured, you can be 1) overwhelmed by SPAM. 2) Have your box HACKED. 3) become BLACKLISTED.

        There are ways to prevent the potential pitfalls of using an email form in the wild, and many of the Monks here could easily help you overcome them. But without greater detail on your part. It will be difficult to advise, or provide direct details.

        --Chris

        ¡λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH

      The obvious response is where is Mail::Sendmail installed? (assuming it is. If not, then you have to get that from CPAN first.)

      It helps to remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.