in reply to Difficulty in sending mail with Activestate Perl 5.10 on a windows server
In the first iteration of your program you are using /usr/bin/sendmail, which is UNIX call, not a Windows call.
I don't see why you would need CGI::Carp because you are not using CGI to send Email.
Also, does the d:/perl/lib/auto/Socket/Socket.dll file exist? It says access denied which means to me that you don't have permissions.
This is a simple email script that you can probably get to work if you install Mail-Sendmail on your system.
use strict; use Mail::Sendmail; $Mail::Sendmail::mailcfg{smtp}=['mailhost.yourserver.com']; my %mail= ( To=>'herkum@yourserver.com,herkum@perl-example.com', From=>'you@perlmonks.org', Subject=>'Subject', Message=>'Body', ); Mail::Sendmail::sendmail(%mail) or die "Mail::Sendmail::error: '$Mail: +:Sendmail::error'";
|
|---|