mam problem z wysyłaniem maili za pomocą PHPMailer poniżej kod. Czy możecie wskazać mi błąd? Bo już ręce opadają, ciągle dostaję odpowiedź:
"Message was not sent.Mailer error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki...eshooting"
function send_mail($email,$message,$subject) { require_once('mailer/class.phpmailer.php'); //dodanie klasy phpmailer require_once('mailer/class.smtp.php'); //dodanie klasy smtp $mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP $mail->Host = "poczta.o2.pl"; // specify main and backup server $mail->Port = 587; $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = 'adres@tlen.pl'; //SMTP username $mail->Password = '**********'; // SMTP password $mail->From = 'adres@tlen.pl'; $mail->AddAddress($email); $mail->Subject = $subject; $mail->Body = $message; $mail->WordWrap = 50; if(!$mail->Send()){ } else{ } }