This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
Alter Config.php
Started 15 years ago by CraigLlewellyn | 5 posts |
-
I installed MachForm OK but never setup the email details in config.php. I have now got around to this and copied the file to the server but the form isn't sending email. I am confident the details are OK. Should I have to reload the machform folder and do a fresh install running the installer.php with the updated config.php file or will copying it to the server be fine? If I have to do a full fresh install can I back up my form?
Just trying to work out where the problem might be. I've seen a few posts about this but the fix always seem to get done outside of the forum.
Thanks.
Posted 15 years ago # -
No need to re-install your machform to get the email working.
Most of the time, your hosting company require you to use SMTP to be able sending email.
Make sure to contact your host to get the info about this and then put them into your config.php file.If the problem persist, we can help you directly.
Please send us your config.php file and the URL to your machform.Mail to: customer.service [at] appnitro.com
MachForm Founder
Posted 15 years ago # -
Contacted by host. Reply below.
So long as the php form generates a from address which a valid Fasthosts mailbox we do allow the use of such forms. You will however need to ensure that your code includes the ini_set function as described in the following article. This is to ensure that all emails send through the form are fully validated. Sending email from web scripts:http://www.fasthosts.co.uk/knowledge-base/?article_id=65
Basically I need to add:
Use the PHP mail function and set the mail from using the following line of code - replacing $email_from with the correct domain name.
ini_set("sendmail_from", " $email_from ");
You need to add a fifth "-f" parameter to the sendmail function. This will set the name of the from address.mail($email_to, $email_subject, $email_message, $headers, '-f'.$email_from);
Will give it a go later.
Posted 15 years ago # -
Contacted by host. Reply below.
So long as the php form generates a from address which a valid Fasthosts mailbox we do allow the use of such forms. You will however need to ensure that your code includes the ini_set function as described in the following article. This is to ensure that all emails send through the form are fully validated. Sending email from web scripts:http://www.fasthosts.co.uk/knowledge-base/?article_id=65
Basically I need to add:
Use the PHP mail function and set the mail from using the following line of code - replacing $email_from with the correct domain name.
ini_set("sendmail_from", " $email_from ");
You need to add a fifth "-f" parameter to the sendmail function. This will set the name of the from address.mail($email_to, $email_subject, $email_message, $headers, '-f'.$email_from);
Will give it a go later.
Posted 15 years ago # -
Fixed.
The other thing my host didn't make perfectly clear is that not only must it be a valid email hosted by them it must also be on the same domain as the form.
Posted 15 years ago # -
Ah... thanks for sharing the info here.
MachForm Founder
Posted 15 years ago #
Reply
You must log in to post.