I'm trying to get email to work on a win2003 server. I have been given a .pl file that contains all the code but was written to run on a different platform. I've been trying to figure out what I have to do for a few weeks now and really need to get this working. here is the code that does the actual emailing within the .pl file. I beleive it was written for Linux, I need to figure out what to change. I have put the sendmail.pl file in the appropriate folder but can't figure out what needs to be changed from there. any help or direction on where I can get info to figure this out is much appriciated.

open (MAIL, "|/usr/sbin/sendmail -t") || warn print "Can't send mail: $!\n";

print MAIL<<"EMAIL";
From: $from
To: $emailaddress
BCC: $notify_email
Subject: Welcome to AtlanticCanadaRealty.com!

Welcome!
Please make a note of the following information. You will need it if you want to modify your ad.

Username: $orig_username
Password: $password
IP Logged: $ENV{REMOTE_ADDR}

To post or edit your ad, click here:
[url]http://[/url]$domain/$path_to_cgi?id=$orig_username&pw=$password

EMAIL
close(MAIL);
exit;
}

tia

    What mail server are you running? The Windows internal mail server doesn't work very well. It is recommended that you get a separate, like Mercury Mail Server.

      3 months later

      Hi,

      I have problems with mercury mail. I installed XAMPP for windows and was trying to create a php code that sends email. But everytime I execute the code I get this error:

      Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for jjgobot@smart.com.ph in C:\xampp\xampp\htdocs\simdev\scratch\test.php on line 6

      Then I figured I had to start the mercury mail first (mercury_start.bat). I didn't get the error but when I checked Mercury Mail's SMTP Client (end-to-end) window this error is logged in connection history:

      Mercury/32 Transport System, Full SMTP Client Module v4.01a,
      Copyright (c) 1993-2003, David Harris, All Rights Reserved.

      This product includes software developed by the University
      of California, Berkeley and its contributors. Portions of this
      program are copyright (c) 1999-2001, MurkWorks Inc,
      http://www.murkworks.com

      Current name service information:
      Hosts file : C:\WINNT\System32\drivers\etc\hosts
      Domain :

      15:16:29: processing job MO0030CA
      Temporary error 249 (temporary MX resolution error) resolving 'smart.com.ph'.

      Please help! I'm a newbie here.

      Thanks!

      JJGobot

        Write a Reply...