Email not working

7 posts by 2 authors in: Forums > CMS Builder
Last Post: April 29, 2011   (RSS)

By Toledoh - April 13, 2011

Hi Guys,

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
Cheers,

Tim (toledoh.com.au)
Attachments:

contact_004.php 6K

Re: [Toledoh] Email not working

By Dave - April 13, 2011

Hi Tim,

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!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Email not working

By Toledoh - April 13, 2011

no effect from that Dave...
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] Email not working

By Dave - April 13, 2011

Ok, I'd create a separate script to debug the mail issue with just this content:

<?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.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Email not working

By Toledoh - April 13, 2011

Will do.

Is there anything that needs to be installed on the server? This is on a VPN and it's only just been set up.
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] Email not working

By Dave - April 14, 2011

Hi Tim,

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.
Dave Edis - Senior Developer
interactivetools.com