0

I'm using azure to hose my site, and my contact form wont sent emails to me via php alone. So I thought I might have to use SMPT too. Is this correct?

I have this so far:

if (@mail($to, $email_subject, $email_body, $headers) == FALSE) {
return false;
}
else {
return true;
}

$mail->Mailer = "smtp"
$mail->CharSet = 'UTF-8';

$mail->Host       = "########"; // SMTP server example
$mail->SMTPDebug  = 0;                     // enables SMTP debug information        (for testing)
$mail->SMTPAuth   = true;                  // enable SMTP authentication
$mail->Port       = 123;                    // set the SMTP port for the GMAIL   server
$mail->Username   = "###########"; // SMTP account username example
$mail->Password   = "###########";        // SMTP account password example
  • 1
    Similar answers post in https://social.msdn.microsoft.com/Forums/en-US/33e913e4-42b9-4a7b-a6d3-782545671736/sending-mail-through-php?forum=ssdsgetstarted as well, please try it and see if you have any further concerns – Ming Xu - MSFT Jun 21 '15 at 14:36
  • I've figured it out ming it was a problem with my code, does azure allow php to use the mail() function? – Bosco Noronha Jun 29 '15 at 03:53
  • You can use a service like SendGrid to send your emails: http://sendgrid.com/windowsazure.html & https://azure.microsoft.com/en-us/documentation/articles/store-sendgrid-php-how-to-send-email/. For Mail function, please refer to option2 at http://stackoverflow.com/questions/10582492/how-can-i-send-an-email-using-php-at-windows-azure – Ming Xu - MSFT Jun 29 '15 at 13:53

0 Answers0