Email not working
7 posts by 2 authors in: Forums > CMS Builder
Last Post: April 29, 2011 (RSS)
By Toledoh - April 13, 2011
Can anyone see a reason why this form (attached) is collecting the data, adding it to the db table, but not sending the email?
Can be viewed at:
http://www.workshoptuesdays.com.au/renovationfix/contact.php
Tim (toledoh.com.au)
Re: [Toledoh] Email not working
By Dave - April 13, 2011
Try displaying the errors if there are any. Add the code in red:
$errors = sendMessage(array(
'from' => "tim@forrest.id.au",
'to' => "tim@toledoh.com.au",
'subject' => "Renovation Fix Contact",
'text' => "Text message content",
'attachments' => array(
'form.csv' => $csv
)
));
if ($errors) { die($errors); }
Let me know if that outputs anything. Thanks!
interactivetools.com
Re: [Dave] Email not working
By Toledoh - April 13, 2011
Tim (toledoh.com.au)
Re: [Toledoh] Email not working
By Dave - April 13, 2011
<?php
$errors = sendMessage(array(
'from' => "tim@forrest.id.au",
'to' => "tim@toledoh.com.au",
'subject' => "Renovation Fix Contact",
'text' => "Text message content",
));
if ($errors) { die($errors); }
print "done!";
?>
And see if that does anything. Also, check your spam folder in case it got flagged accidentally.
interactivetools.com
Re: [Dave] Email not working
By Toledoh - April 13, 2011
Is there anything that needs to be installed on the server? This is on a VPN and it's only just been set up.
Tim (toledoh.com.au)
Re: [Toledoh] Email not working
By Dave - April 14, 2011
It could just be that mail is not configured properly on their server. You could just upload a test formmail script and see if that works.
All PHP does is pass the message off to an outgoing mail (SMTP) server. You can see the domain of that server under: Admin > General > phpinfo > Search for "SMTP". If it says "localhost" it's a mail server on the same machine.
It's possible they are just being collected on a localhost mail server and never being sent. The quickest test would be to try a formmail script so we can isolate the source of the problem.
interactivetools.com
Re: [Dave] Email not working
By Toledoh - April 29, 2011
Just for reference if anyone esle has this problem, I've finally got it sorted. Below is the response from my host;
Hi Tim,
PHP mail is working fine in the server. I put a test script at
http://www.workshoptuesdays.com.au/renovationfix/test.php and it is sending mail to XXX fine. This was the mail address present in your contact form.
===================================
2011-04-29 10:19:01 1QFkmr-0002xH-4m XXX R=lookuphost T=remote_smtp H=av1.anchor.net.au [202.4.234.193]
2011-04-29 10:19:01 1QFkmr-0002xH-4m Completed
===================================
I noticed that your hostname server.workshoptuesdays.com.au is not resolving. Please add A record for server.workshoptuesdays.com.au to point to 111.118.175.2. You are using remote nameservers, so this needs to be done there.
Even though it is loading here, there are a few things that I can suggest which will make your server more secure, and will also correct these problems.
1) Enable suphp, so that the php script will run under the user's ownership
2) Disable the option to send email as nobody.
3) Set RDNS for the server IP address
Tim (toledoh.com.au)