Best mail script?

taff's picture

They have: 956 posts

Joined: Jun 2001

Ok, I'm not a perl/cgi guru to begin with but I find that many of the generic mail form scripts give me such a headache.

I'm looking for a recommendation on the simplest, most flexible email form script out there for UNIX. What is everyone's favourite?

.....

They have: 601 posts

Joined: Nov 2001

Are you using Perl here? Then if you are; do yourself a favour and bin those dodgy formail scripts you find on hotscripts and the like!

Use a far more powerful perl module - this one already comes as part of the standard perl dist. so it's on your machine already - no download neccessary, and will work on all unix flavours and win32 boxes alike ensuring compatibility acrross the board.

The module is called Mail::Sendmail and here's a quick example of how you would use it:

#!/usr/bin/perl

  use strict;
  use Mail::Sendmail;

    my %mail = {};

    %mail = ( To      => $to,
              From    => $from,
              Subject => $sub,
              Body    => $body
            );

    &sendmail(%mail) or die $Mail::Sendmail::error;
'
Now that really couldn't be simpler, could it? Smiling

- wil

taff's picture

They have: 956 posts

Joined: Jun 2001

Interesting.. I replied to this hours ago. A bug or did I miss the submit button?

My question was:

Is what you posted saved as .pl or .cgi and called from a form as regular mail scripts are? Can additional fields be added?

.....

They have: 157 posts

Joined: Mar 2002

Just my 2 cents here.

Ditch Perl dude. Pick up on PHP4. I was a Perl junkie once till I discovered PHP. Although Pearl can perform more extremely high level customization. Mostly, PHP can do it all far more simpler.
To me, Perl is for programmers who want to code till thier eyes pop out and come up with new technologies and stuff, that PHP programmers eventually convert to PHP modules and such anyways. Any website out there can be duplicated the PHP way, forums, chat, shopping, etc... with far less hair pulling.

It's just my 2 cents though. I'd hate for a newbie programmer to see this posting and try Perl stuff without knowing that PHP is far easier.

taff's picture

They have: 956 posts

Joined: Jun 2001

PHP is great but not always an option, depending on the client's host. Since I can be dealing with a different hosting setup virtually every week, that's why I'm looking for something simple and versatile.

.....

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.