Jump to content

perplexeddev

New Members
  • Posts

    2
  • Joined

  • Last visited

perplexeddev's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I tried all the steps mentioned above but I still get the message "Email delivery Failed". I saw the following error in PHP Log: PHP Warning : mail(): SMTP server response: 530 5.7.1 Client was not authenticated in on line 10. Line 10 is if(mail($to, $subject, $message, $headers)) in my PHP file.
  2. I am new to PHP, I have a website done in HTML and PHP.In my site,I have a form that sends mail. My PHP code is ?php try{ $to = 'test@test.com'; $subject = 'the subject'; $message = 'hello'; $headers = 'From: noreply@test.com' . "\r\n" . 'Reply-To: test@test.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); if(mail($to, $subject, $message, $headers)) { echo("<p>Email successfully sent!</p>"); } else{ echo("<p> Email delivery failed </p>"); } } catch(Exception $e){ echo 'Caught Exception', $e->getMessage(), "\n"; } ?> I am using valid to and from addresses, but i always get the message "Email delivery Failed" and I dont get the email. Also I have deployed my website in windows server, are there any configurations to be done on the server. Thanks for your help in advance.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.