nette / mail

A handy library for creating and sending emails in PHP
https://doc.nette.org/mailing
Other
463 stars 70 forks source link

HTML Decode errors? #54

Closed alisacorporation closed 6 years ago

alisacorporation commented 6 years ago

When i got an error: Fatal error: Uncaught Nette\Mail\SendException: Unable to send email: Failed to connect to mailserver at &\quot;ssl://smtp.gmail.com&\quot; port 465, verify your &\quot;SMTP&\quot; and &\quot;smtp_port&\quot; I think it's not beautiful.. Than i change this: (48-51 line @ SendmailMailer.php)

$info = ": $message";
});
if ($res === FALSE) {
    throw new SendException("Unable to send email$info.");

to this

$info = $message;
});
if ($res === FALSE) {
    throw new SendException("Unable to send email: " . html_entity_decode($info));

and the result little bit beautiy for client eyes: Fatal error: Uncaught Nette\Mail\SendException: Unable to send email: Failed to connect to mailserver at "ssl://smtp.gmail.com" port 465, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()

I put backslashes, so you see the problem, because on preview that's decode, but in script no)) Thank you.