On Mar 4, 2004, at 12:36 AM, Baiss Eric Magnusson wrote:

I looked into the file </Library/Perl/Sendmail.pm>

Is that really where you found it? If so, it's not installed correctly. It should be in </Library/Perl/Mail/> - on Panther, </Library/Perl/5.8.1/Mail/>.


You *did* install it according to the directions, right? The directions are found in 'perldoc perlmodinstall' - as far as these directions are concerned, you're using a UNIX machine. The Mac directions are for MacPerl running on "classic" MacOS, not for Mac OS X.

The Sendmail I am using is <http://alma.ch/perl/mail.htm> and is on CPAN.

As I said before - the module that's listed at that URL, and listed on CPAN, is not named just "Sendmail" - it's name is "Mail::Sendmail".


From your first message:

because this is the line that fails:

$err = "Error sending mail: $Mail::SendMail::error" unless sendmail(%mail);

The above will fail because you're referring to $Mail::SendMail::error, and there is no such module and no such variable. As I said before, case is important. The module, and the package it's in, is called "Mail::Sendmail" - not "Mail::SendMail".


Can I check these Perl scripts on my client machine ( i.e. no Apache installed)

Why is there no Apache installed? Did you remove it from your machine? If not, it's there - every OS X includes it. Just go to the System Preferences, and under the Sharing pane, enable Web Sharing. (Personal Web Sharing on Panther).


It's also useful to open /var/log/httpd/error_log in the Console.app - any error messages produced by your CGI script are logged there.

So far, I get the same error on the client machine as I get from the server.

It would be helpful if you'd include the error message. Don't try to re-type it, or any code - copy and paste, to reduce the chance of typos.


It would also be helpful reduce the problem to the smallest possible program that shows the error, and post that. For example, try running just the example given in 'perldoc Mail::Sendmail' from a command line, and see if that produces an error. If it does, post the test script and error message here.

If the sample script doesn't produce an error, then you know that the module is installed and working correctly. In that case, you need to find where your script does something different from the sample.

sherm--

Reply via email to