Advertisement
Guest User

Untitled

a guest
Jul 7th, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. use MIME::Lite;
  2. use Email::Sender::Transport::SMTP;
  3. $to= 'emartins@ecnex.com';
  4. $cc= 'emartins.ecnex@gmail.com';
  5. $from='emartins@ecnex.com';
  6. $subject='Test mail';
  7. #$message='Esto es una prueba de mail';
  8. $message=(
  9. 'Testing: enviando arrays-mails en perl
  10. y archivos zip..
  11. ...gato. '
  12. );
  13. $msg=MIME::Lite->new(
  14. From =>$from,
  15. To =>$to,
  16. Cc =>$cc,
  17. Subject =>$subject,
  18. Data =>$message
  19. );
  20. $msg->attach(Type =>'aplication/zip',
  21. Path =>'E:\Documents and Settings\Esteban\mi_perl\saraza.zip',
  22. Filename =>'saraza.zip',
  23. Disposition =>'attachment'
  24. );
  25. $msg->send('smtp','mail.ecnex.com',AuthUser=>'emartins@ecnex.com',AuthPass=>'passwd');
  26. print "Email enviado\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement