[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 137
  • 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( 127.0.0.1,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.
0
chunky1
Asked:
chunky1
1 Solution
 
TintinCommented:
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.
0
 
manav_mathurCommented:
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
}
0
 
moduloCommented:
PAQed with no points refunded (of 125)

modulo
Community Support Moderator
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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