php - PHPmailer can't connect to smtp server -


i've been using phpmailer (https://github.com/synchro/phpmailer) send email through amazon ses few months. @ time in last 2 weeks has stopped working, , haven't touched it. i'm getting error msg:

smtp error: not connect smtp host.

this code.

public function sendemail($to,$subject,$body){      $mail = new phpmailer;     $mail->issmtp();     // set mailer use smtp     $mail->host = 'amazonaws....';  // specify main , backup server     $mail->smtpauth = true;  // enable smtp authentication         $mail->username = 'mysmtpuname';   // smtp username     $mail->password = 'smtppword';   // smtp password     $mail->smtpsecure = 'tls';  // enable encryption, 'ssl' accepted     $mail->from = 'example';     $mail->fromname = 'me';     $mail->addaddress($to); // name optional     $mail->ishtml(true); // set email format html      $mail->subject = $subject;     $mail->body    = $body;      return $mail->send();        } 

my amazon account still upto date , active. there way print out more detailed error msgs debugging? has there been known issues lately?

try :

$mail->smtpdebug = 1; // if you're using ssl $mail->smtpsecure = 'ssl'; // or use tls $mail->smtpsecure = 'tls'; 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -