Report this

What is the reason for this report?

Is there some software that I need to install to be able to use a PHP contact form - It was working on a Share Hosting

Posted on August 29, 2015

Hi,

I recently moved from a share hosting company to DO, I configured my server and everything is working fine except for a contact form that I have been using for years, I have php installed and it works with other PHP pages.

What I have is an HTML page (form) which sends a post request to a .php page. When I click the send button from the HTML form the server seems to process the PHP page because I see the HTML page that I created to notify the sender that the form was sent, but no email is really been sent.

Is there any software that I need to install in order to be able to send information through a form?

BTW I’m using Ubuntu and NGinx.

Thanks



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@MrPeppah

Hmm, for some reason It doesn’t work for me.

This is what I did…

  1. Install sendmail-ben sudo apt-get install sendmail-bin

  2. I looked at the hosts file but I didn’t make any changes because it already had that right information. This is how it looks. 127.0.1.1 MyDropletName MyDropletName 127.0.1.1 localhost

  3. Ran sudo sendmailconfig

  4. Tested in terminal and using form and it just. In terminal a) sendmail someEmail@yahoo.com b) enter c) typed some text d) enter and nothing happen, no email was sent.

When I test it using the form I get the following error. 504 Gateway Time-out

Am I missing something? Any idea?

@CrypticDesigns First of all thank you for your help.

Wow, it looks like a tedious process just to process a simple contact form. Why would I need to provide an email and password? I already have this defined in my PHP form. When I had this working in my previous share hosting I didn’t have to do that, I guess that is the difference between mange your server your self vs share hosting.

All I want is to be able to send the information from the form as an email.

Thanks

@CrypticDesigns One last question, do you know if there is any security configuration that I need to make for sendmail or there is nothing to worry about?

The reason for my question is because I have heard that mail servers need some sort of security configuration.

Thanks

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.