By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,811 Members | 1,978 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,811 IT Pros & Developers. It's quick & easy.

error with module Mime::LITE

P: 63
Hi, I'm trying to create a script that send a file in attachment of a mail:

my code is something like this:
Expand|Select|Wrap|Line Numbers
  1. #set  up email
  2.     my  $to = "xxx\@xxxxxx.com";
  3.         my  $from = "xxx\@xxxxx.com.br";
  4.         my  $subject = "ficheiro audio ";
  5.     my  $message = "ficheiro audio ";
  6.         my  $path = "/home/user/Desktop/outputs/20080101_titulo-teste.mp3";
  7.  
  8. # send email
  9.      &email($to, $from, $subject, $message, $path);
  10.  
  11. ub email{
  12.     print "estou dentro de email";
  13.  # get incoming parameters
  14.  ($to, $from, $subject, $message, $path) = @_;
  15.  
  16.  
  17.  # create a new message
  18.  $msg = MIME::Lite->new(
  19.   From => $from,
  20.   To => $to,
  21.   Subject => $subject,
  22.   Data => $message,
  23.   Type => 'text/plain'
  24. );
  25.  $msg->attach(
  26.           Type => 'audio/x-mp3',
  27.           Disposition => 'attachment',
  28.           Path => $path); 
  29.  
  30.  # send the email
  31.  MIME::Lite->send('smtp','smtp.mail.yahoo.com.br', 
  32.           Timeout => 60, Debug =>1,
  33.              AuthUser=>'tvnet_parceiros_audio', AuthPass=>'*****');
  34.  
  35. $msg->send();
  36. };
  37.  
The problem is tha I get an error in the Debug:

MIME::Lite::SMTP=GLOB(0x87c5f90)>>> MTIzNDU2
MIME::Lite::SMTP=GLOB(0x87c5f90)<<< 535 authorization failed (#5.7.0)
SMTP auth() command failed:
authorization failed (#5.7.0)

The weird thing is that if I use another account (yahoo and everything the same) but older it works perfectly.
This account I'm trying was created yesterday.
Someone knows what's happening with my smtp authorization?

thanks for any help,

Joćo
Aug 27 '08 #1
Share this Question
Share on Google+
1 Reply


KevinADC
Expert 2.5K+
P: 4,059
The error does not appear to be coming from the module. The error is the smtp server, but I have no idea why that is.
Aug 27 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.