Witam
zaczne od tego ze w porpzednich skryptach mam ten samo kod do wysylania emali i jest ok, ale dla nowego utworzonego konta w gmail mam caly czas problem z wyslaniem emaila przez klase PHPMAiler ([Version] => 5.2.9); otyrzymuje blad:
**SMTP connect() failed. **
sprawdzam debugerem, wszystko jest na swoim miejscu, ale zeby nie bylo to zamieszczam ponizej kod:
w konstruktorze wywoluje:
$this->mail->IsSMTP();
$this->mail->CharSet = 'UTF-8';
$this->mail->SMTPDebug = 0;
$this->mail->SMTPSecure = "ssl";
$this->mail->SMTPAuth = true;
$this->mail->Host = "smtp.gmail.com";
$this->mail->Port = 465;
$this->mail->Username = $mycompany;
$this->mail->Password = $mypswd;
$this->mail->SetFrom($mycompany, 'any');
potem :
$subject_mail = 'tytul';
$message = 'tresc htmla';
$this->mail->AddAddress($mycompany, 'any');
$this->mail->AddReplyTo($_email,$_person);
$this->mail->IsHTML(true);
$this->mail->Subject = $subject_mail;
$this->mail->Body = $message;
$this->mail->AltBody = $message;
$res_sendmail = $this->mail->Send();
if(!$res_sendmail) {
return $this->mail->ErrorInfo;
} else {
return true;
}
Nie mam pojecia o co moze jeszcze chodzic...