in reply to perl formmail question

I agree with stevieb. "Matt's Script Archive" was known as a pile of junk in 1995 when he started it. His versions of tools enabled people with (a) no programming ability and (b) no access to their server, to do something like what you are attempting, e.g. send an email through a form -- as long as you didn't care about security, or memory leaks, or the thing actually working all the time.

You should hire a Perl programmer and pay him or her to go into your server and redo your script with proper tools. Even the most unenlightened shared hosting company nowadays will have the necessary CPAN modules, such as MIME::Lite for example. Really, truly you should do this. It's an hour or two's work for anyone who knows what they are doing.

I see that you describe yourself as a "noobie" so maybe you would like to learn Perl: start by finding out what Perl modules your host server provides, and what is the procedure for installing them. If you are on a server using cPanel it should be just some buttons to click. When you have installed a module (or two) so that you can safely send emails using such tools, you can substitute your own script instead of the one you have, and you'll be able to use your same HTML page with the same form fields, so you don't have to worry about having to change the website. And then you'll be doing it right.

In the mean time, not that you should do this, because you should do what I suggested above, but try changing:

print MAIL "From: $Config{'email'} ($Config{'realname'})\n";
to:
print MAIL "From: $Config{'realname'} <$Config{'email'}>\n";
The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^2: perl formmail question
by Lotus1 (Vicar) on Aug 26, 2015 at 22:17 UTC

    I have some scripts using MIME::Lite out there but I don't recommend it to people and I need to update to use something else.

    From the MIME::Lite docs:

    WAIT!

    MIME::Lite is not recommended by its current maintainer. There are a number of alternatives, like Email::MIME or MIME::Entity and Email::Sender, which you should probably use instead. MIME::Lite continues to accrue weird bug reports, and it is not receiving a large amount of refactoring due to the availability of better alternatives. Please consider using something else.

      I'm familiar with that notice. I'm pretty sure that RJBS means that other alternatives are "better" and he is not really interested in spending time on bug reports etc from something he feels is sub-optimal. Fair enough, buyer beware, but I am happy with it.

      I have not experienced any problems with MIME::Lite, but then I use it for trivial e-mailing (no attachments, ASCII-only subject line, etc). In particular I continue using it because it is installed on most shared hosting servers, and since MIME::Lite::TT is Pure Perl, a user can install that in his/her home directory and run it with no compiler needed. For distributing programs to customers this combo is great, since they can be handed a Template template, and a Config::Tiny config file, with which they can completely control the email messaging, while keeping their fingers out of the code.

      The way forward always starts with a minimal test.