Rapunzel (ritugoyal12 at gmail of com) asked

Hi ,

I want to send email through MAc perl. I have an SMTP server and my OS
is MAC.

Mac OS X (jaguar/panther/leopard) or the classic Macintosh (System 7, Mac OS 8/9)?

You say you have an SMTP server, which one? How did you set it up? Do you have documentation for it?

I used Mail::Sender perl module and was successfully able to send
email through windows platform.

Microsoft tends to be very helpful in ways that, after you think about it, you wish they hadn't. (Do you really want just any old process to be able to send mail?)

But if I execute same script on MAC OS
it is giving me error saying authentication required.

Which is how it should be, unless you have the authentication already set up.

Following is my code snippet.

#!/usr/bin/perl
use Mail::Sender;
     $sender = new Mail::Sender {
                smtp => 'smtpserverIP',
                from => 'sender_Email'
        };
die "Can't create the Mail::Sender object: $Mail::Sender::Error
\n"
                unless ref $sender;
        ref $sender->Open({
                to => 'receiver_Email',
                subject => 'test mail.'
        })
                or die "Can't open the message: $sender->{'error_msg'}
\n";
         $sender->SendLineEnc("Hi");
        ref $sender->Close
                or die "Failed to send the message: $sender-

{'error_msg'}\n";


On executing the script I am getting following error:
Can't open the message: Server error 503 5.0.0 Authentication
required"

Unfortunately, I never learned how to do the authentication stuff, but my understanding is that you need to tell perl how to authenticate with your server(s).

Please help me to make this work. Also is there any other way of
sending an email through Mac perl.

Can't answer that question either, but if your Mac OS machine is a recent one (less than seven years old), you are probably running on Mac OS X, and there are a lot more people who can help with this kind of question on the Mac OS X list: <[EMAIL PROTECTED]>.

Even if you really are running a 7+ year old machine, if no one better able to answer your question than I responds here, you might want to post a note to the Mac OS X list to see if you can get some of the other guys who still hang around there to drop back in here to help.

Joel Rees
(waiting for a 3+GHz ARM processor to come out,
to test Steve's willingness to switch again.)


Reply via email to