0

I'm following this tutorial, and I can't get it to work.

I even copied the finished example (and put my E-mail in the recipient section) and it still doesn't work as I never receive an E-mail.

My environment:

  • Apache 2.4.29
  • PHP 7.2
  • Ubuntu 18.04 64-bit.
atline
  • 28,355
  • 16
  • 77
  • 113
Aaron Franke
  • 3,268
  • 4
  • 31
  • 51
  • What is your email service? Did you setup the email server on your local server at all? – Navid Jan 05 '19 at 05:59
  • The recipient E-mail is Yahoo. The tutorial makes no mention of an E-mail server, I have not set one up. – Aaron Franke Jan 05 '19 at 06:00
  • have you tried to debug? – Umar Abdullah Jan 05 '19 at 06:00
  • NMoeini is on the correct track here your problem is almost certainly you don't have a valid email smtp setup to handle sending email. Go to Sendgrid and sign up for free, follow their toutorial. You want to use a 3rd party or your emails probably will be in the spam folder or not work at all. – rifi2k Jan 05 '19 at 06:02
  • The debugger in Firefox says 200 OK for the POST request my HTML5 form submits. @rifi2k Why is this not mentioned in any of the tutorials online? Very frustrating. – Aaron Franke Jan 05 '19 at 06:03
  • I'm telling you do what I said and use the API method if possible. Your 200 just means your front end is good your back end is the issue – rifi2k Jan 05 '19 at 06:05
  • When I get home I'll link you to a good explaination of how to do what you want – rifi2k Jan 05 '19 at 06:06
  • So you need an email server up and running on your environment (your local machine). Follow this [gist](https://gist.github.com/raelgc/6031274) if you want. – Navid Jan 05 '19 at 06:11
  • What MTA are you using? What do the logs (mail.log, syslog) show? – digijay Jan 05 '19 at 06:13
  • I don't know what an MTA is. I tried following [the tutorial](https://stackoverflow.com/a/14456761/4441547) that @damnguy linked and it did not work. I tried setting up PHPMailer with SendGrid as rifi2k suggested, I copied the code and added the login details, yet it does not work. – Aaron Franke Jan 05 '19 at 06:19
  • 1
    I agree with damnguy this is probably asked and answered multiple times also a Google search for the title of the linked duplicate topic will yield you a ton of actionable ways to go about solving this. This link explains MTA as well https://blog.edmdesigner.com/sending-email-with-php/ If you continue to have issues I would recommend finding a hosting company offering fully managed Wordpress hosting I guarantee you can get into a site which will be plug and play for under $7 a month. – rifi2k Jan 05 '19 at 08:09

0 Answers0