• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 140
  • Last Modified:

Cannot get Sendmail to work.

Hello Everyone,

Please bear with me as I am new to perl. I have been tasked to move a web site form one ISP to another. I am trying to replicate the formmail and send mail routines as I expect out new ISP to supply them.

I have installed Perl onto a Window XP machine running IIS. I have then installed Mail-Sendmail-0.79 from http://ppm.activestate.com/PPMPackages/zips/8xx-builds-only/

The Sendmail routine seems to install correctly, and I have changed the configuration as follows :

%mailcfg = (
    # List of SMTP servers:
    'smtp'    => [ qw(,localhost ) ],
    #'smtp'    => [ qw( mail.mydomain.com ) ], # example

    'from'    => '', # default sender e-mail, used when no From header in mail

    'mime'    => 1, # use MIME encoding by default

    'retries' => 1, # number of retries on smtp connect failure
    'delay'   => 1, # delay in seconds between retries

    'tz'      => '', # only to override automatic detection
    'port'    => 25, # change it if you always use a non-standard port
    'debug'   => 0 # prints stuff to STDERR

When I execute the HTML page the formmail.pl seems to work as it displays a page after submission detaining the fields sent. However the email part does not seem to work. I'm not sure if it has even been executed can anyong help please ?

The formmail has been configured with the line :

$mailprog ='C:\Perl\site\lib\Mail\sendmail.pm';

This is the location of the sendmail script within the perl directory.

I am also able to see if the mail has been sent as I am running a local email server.

If anyone has a working set of scripts I will also be willing to reinstall different ones, aslong as I have instructions to follow.

Many thanks in advanced.
1 Solution
You would be best to ask your ISP which SMTP you should be using.   Then you don't have to worry about installing other modules.
I hope you are checking sendmail()'s return code

sendmail(%mail) or $err_msg="$Mail::Sendmail::error";
if($err_msg) {
#wrap some error message in CGI
PAQed with no points refunded (of 125)

Community Support Moderator
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now