1. <?php
  2.  
  3. require_once 'Mail.php';
  4.  
  5. $params['host'] = 'poczta.o2.pl';
  6. $params['port'] = 25;
  7. $params['auth'] = true;
  8. $params['username'] = 'login';
  9. $params['password'] = 'haslo';
  10.  
  11.  
  12. $headers['Subject'] = 'Email testowy';
  13. $headers['From'] = 'login@o2.pl';
  14. $headers['Content-type'] = 'text/html; charset=charset=UTF-8';
  15.  
  16. $body = 'Pozdrawiam!!';
  17.  
  18. $recipients = 'login2@o2.pl';
  19.  
  20. $mail = Mail::factory('smtp', $params);
  21.  
  22. if (PEAR::isError($mail)) {
  23. echo "1. ";
  24. print $mail->getMessage();
  25. } else {
  26.  
  27. $error = $mail->send($recipients, $headers, $body);
  28. if (PEAR::isError($error)) {
  29. echo "2. ";
  30. print $error->getMessage();
  31. } else {
  32. print 'mail został wysłany.';
  33. }
  34. }
  35.  
  36. ?>


Dostaje odpowiedź:
2. authentication failure [SMTP: SMTP server does no support authentication (code: 250, response: 8.mail-out.ovh.net PIPELINING STARTTLS 8BITMIME SIZE 0)]

Proszę o pomoc...