/
var
/
www
/
html
/
dreamamerica
/
Upload File
HOME
<?php $config = Array( 'protocol' => 'smtp', 'smtp_host' => 'dreamamerica.com', 'smtp_port' => 465, 'smtp_user' => 'dev@dreamamerica.com', 'smtp_pass' => '}G~*wn3%!?y2', 'mailtype' => 'html', 'charset' => 'iso-8859-1' ); $smtp = new SMTP(); $smtp->do_debug = 4; $smtp->startTLS(); if (!$smtp->connect('ssl://dreamamerica.com', 465)) { echo "Connect failed. Could'nt Connect to Host"; } if (!$smtp->hello(gethostname())) { echo 'EHLO failed: ' . $smtp->getError()['error']; } $e = $smtp->getServerExtList(); if (is_array($e) && array_key_exists('STARTTLS', $e)) { $tlsok = $smtp->startTLS(); if (!$tlsok) { echo 'Failed to start encryption: ' . $smtp->getError()['error']; } if (!$smtp->hello(gethostname())) { echo 'EHLO (2) failed: ' . $smtp->getError()['error']; } $e = $smtp->getServerExtList(); } if (is_array($e) && array_key_exists('AUTH', $e)) { if ($smtp->authenticate('dev@dreamamerica.com', '}G~*wn3%!?y2')) { echo 'SMTP Connection Success!'; } else { echo 'Authentication failed: ' . $smtp->getError()['error']; } } ?>