hi may you please help with email ts giving me this error(failed to connect to smpt port) |
[eluser]Unknown[/eluser]
function send_email() { require_once './PHPMailer_v5.1/class.phpmailer.php'; $mail = new PHPMailer(true); $mail->IsSMTP(); $mail->Host = "pod51014.outlook.com"; $mail->Port = 587 ; $email->Username="[email protected]"; $email->Password="Dut850125"; try { $mail->AddReplyTo('[email protected]', 'Impound'); $mail->AddAddress('[email protected]', 'Lebo'); $mail->SetFrom('[email protected]', 'Impound'); $mail->Subject = "Email from PHP"; $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; optional - MsgHTML will create an alternate automatically $mail->MsgHTML('Hi<br><br>Test impound<br><br>Regards,<br>Impound');//(file_get_contents('./PHPMailer_v5.1/contents.html') ![]() $mail->Send(); echo "Message Sent OK<P></P>\n"; } catch (phpmailerException $e) { echo $e->errorMessage(); } catch (Exception $e) { echo $e->getMessage(); } } |
Welcome Guest, Not a member yet? Register Sign In |