You are here
Hi there,
I'm having an issue with my PHP form not sending an email when the form is submitted on a brand new site on a brand new linode. My programming/coding skills are very limited so sorry for my ignorance.
I had someone on odesk create a website for me with a PHP form on it.
Before he sent me the files we tested the form while he was hosting the page and it worked great.
Now I tried to put it onto my Linode but the php form no longer works. to build the linode I just followed the tutorial on the linode website..
To test if PHP mail() function was either disabled or not configured properly, I made a file mailtest.php to test and replaced you@yourmail.com with my email:
<?php
mail('you@yourmail.com','Test mail','The mail function is working!');
echo 'Mail sent!';
?>
When I navigate to the url domain.com/mailtest.php I do see the "Mail sent!" appear on the page, but no mail is sent.. I believe the issue is with how the linode is set up/configured.
I think if I rebuilt the linode with a different stackscript that was created to allow php mailsending that would be a quick fix to my issue?
Can anyone recomend a stackscript to build a linode with that will enable my php form to work?
I spoke to the developer and he said hes not good with the hosting stuff and recomeneded I get hostgator or any shared hosting that has the latest php installed... but I dont want to use shared hosting!
Thanks!
You will need to provide more information for us to assist
Hi Richard,
We need some additional information to assist you.
1) Which TKLX Appliance?
You stated that you had a developer on oDesk create a website for you. If you do not know, please ask the developer which TKLX appliance he used...Drupal, WordPress, LAMP+HTML/Javascript?
2) Where was it tested?
You stated the the developer tested the form and it worked. Could you ask the developer where he had it hosted when he did his tests...AWS, Rackspace, etc.
3) Who migrated your service?
You stated that you are not very technical and that your developer did not know hosting...so who migrated the working service on the developer's host 'X' to your linode? Did you create a linode instance and the developer copied the wbesite files across?
4) What does your Postfix MailQueue say when you look at it in Webmin?
This is a multi-part process to answer:
4a) Do you have webmin installed?
TKLX WordPress, Drupal, LAMP appliances have a visual management tool Webmin installed to manage your appliance. You can access it via https://xxx.com:12321 where xxx.com is replaced by your domain name.
4b) Do you have Postfix server installed (you should if this is a WordPress, Drupal, LAMP appliance)?
4c) What does your Mail Queue read (it should read "0 messages" if your email was sent, >0 if email is stuck)
Once we have these answers we can go from there.
Cheers,
Tim (Managing Director - OnePressTech)
Same Problem!
Hello,
I have same problem, I have 11 message in the Mail Queue.
Are there any configuration must be set in advanced before using PHP mail?
Thanks
Updates pease?
Hi, I got stuck here as well. Is there a fix for this sendmail issue so far?
Did you read above?
Turnkey Wordpress
I've got this issue... 7 messages in my queue. I looked at them and some are clearly messed up with a bad From address. Others are trying to connect to my domain at the IP address of the web site. All those connections timed out.
Here are some of the details that were requested. 1)TKLX WordPress 14.1. 2)THis question doesn't necessariy apply to me. The problem appliance is a self-hosted VMware VM. 3)A migration was made of the WordPress database. I'm not sure if anything else was migrated, but I assume that the theme and some plugins were. 4)7 messages in queue as I stated above.
My domain uses Microsoft Exchange Online. It's MX record reflects that. Presumably I need to make the Postfix server a relay. How do I do that?
You all share a symptom but you likely don't share a root cause
David and anyone else who comes to this post in the future with mail stuck in their Postfix queue...there are numerous reasons why this might be the case.
1) Out of the Box
- Firewall configuration is the likely root cause of a failure
2) Adjusted post installation to relay emails via an email relay service like GoDaddy, Google, AWS, etc.
- Firewall configuration is a possible root cause of the failure
- "From" and / or "Reply-To" address not matching the site domain a likely cause of the failure
- Relay host requires secure communications (TKLX out of the box sends unsecured email)
- Secure communications not configured correctly
- In the case of Google you will need enable unsecure apps (see related blog post)
I have relayed via GoDaddy, Google and AWS. It is doable but technically finicky.
Q1: David, where are you running your server...in a residential environment with consumer ISP connection or business with dedicated IP address and business ISP connection?
Q2: David, what is the reference to MS Exchange Online...did you do a post-installation Postfix server configuration change to relay email via MS Exchange Online?
Cheers,
Tim (Managing Director - OnePressTech)
FWIW if you want to relay there are docs
Here's the link: https://www.turnkeylinux.org/docs/email-via-remote-smtp
Add new comment