in reply to Re: Need a Mail::SendEasy example using attachments
in thread Need a Mail::SendEasy example using attachments

I forgot one bit of important information in my initial post - I need to use a client agent versus a server. I am not really sure how I tell the difference, but the admin person at my site told me this. I am trying to use Perl to send emails outside my company and he told me I had to use a client agent that would pass a username/password to the Exchange server to be authenticated, otherwise I get "Unable to Relay" error. I am using SendEasy because he suggested it when I told him I was using SendMail. Subsequently I was able to get SendEasy to work with a PDF attachment, but like another poster pointed out it uses "application/octet-stream" for "Content-Type" and I would prefer using a package where I could specify the MIME tags. Could you tell me if Mail::Sender fits what I want? Thanks!!!
  • Comment on Re^2: Need a Mail::SendEasy example using attachments

Replies are listed 'Best First'.
Re^3: Need a Mail::SendEasy example using attachments
by Jenda (Abbot) on Aug 19, 2006 at 15:17 UTC

    It depends on the authentication protocols supported by your exchange server. Mail::Sender does support authentication, but not all protocols. The ones currently supported by Mail::Sender are LOGIN, PLAIN, CRAM-MD5 and NTLM. If you already have Mail::Sender installed you can find what protocols does the server support by this:

    c:\> perl -MMail::Sender -e "print join ', ', Mail::Sender->QueryAuthP +rotocols('the.server.name')"

      Not sure if this is still needed...
      #!/opt/perl/bin/perl -s use lib "/home/me/scripts/lib"; require Mail::SendEasy; #my @cclist = ('me@my.com'); <br> my $msg = `cat ./msg.txt`; my $status = Mail::SendEasy::send( smtp => 'smtp.server.com' , from => 'admin@my.com' , from_title => 'admin' , to => 'whomever@yours.com', cc => \@cclist , subject => "your subject here" , msg => $msg, msgid => "42", anex => \@ARGV ) ; if (!$status) { Mail::SendEasy::error ;}