Contact form won't work on my droplet?

April 26, 2014 974 views
Hello! I am a newbie to Digitalocean.. So I am learning to know more about it. Anyway, I have opened my test website but the contact form won't work. I have tested it on my other hosting service, and it works perfectly (It sends me an email to my email address after filling in the form and submitting it) However, on my droplet site it won't work. I have installed a lot of php packages to make it work (such as Postfix, SSMPT, Sendmail, SASL, MIME, and etc....) I have done a lot of solutions out there, but they won't fix my problem. Contact form just redirects me to the blank site after submitting it. This is odd, this does not happen on my shared hosting server. I believe there is something wrong on my droplet server? Can you guys please help me :( Thank you in advance.
4 Answers
Check your error logs. Those should give you some idea of where to start looking for the problem.
Hello! thank your your response.

These are what I see in mail.log

apr 25 13:35:15 localhost sm-mta[18889]: s3PELAVH007035: to=, ctladdr=
(33/33), delay=03:14:05, xdelay=00:00:00, mailer=esmtp, pri=174075, relay=mysite.me., dsn4.0.0, stat=Deferred: Connection refused by mysite.me.

Apr 25 13:35:16 localhost sm-mta[18888]: deamon MTA-v4: problem creating SMTP socker
Apr 25 13:35:21 localhost sm-mta[18888]: NOQUEUE: SYSERR(root): opendaemonstocket: daemon MTA-4: cannot bind: Address already in use

Connection refused, problem creating SMTP socker, address already in use

Do you have Postfix installed or some other needed Mail Transfer Agent?

I have realized from my own experience that most people switching from a shared hosting environ to a VPS don't realize that the mail service is not included
Messages like "address already in use" are usually an indication that something is already running on the port that your process needs to use. It's not clear to me exactly what is going on because I don't know what your configuration is. But what I see is that something called sm-mta is unable to create an SMTP port. What that says to me is that there is another MTA already running. You'll either need to stop that MTA or configure your script or PHP installation to use the MTA that's already running, or possibly even configure it to run on a different port.
Have another answer? Share your knowledge.