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
Error sending email: Language string failed to load: instantiate
Started 13 years ago by gydesign | 5 posts |
-
I am getting this message:
Error sending email: Language string failed to load: instantiateCan you help? Or tell me the problem if it's on the web host side?
Posted 13 years ago # -
That error message indicate that the PHP mail function on your server is not running properly. You might want to contact your hosting tech support and let them know.
Or you might want to try configuring your machform to use SMTP server.
MachForm Founder
Posted 13 years ago # -
Can you be more specific on what is wrong with the PHP mail function?
And how do I configure the machform to use SMTP server?
Posted 13 years ago # -
Ok, so by default when sending an email the script simply call the mail() function which is available within PHP.
In your case, the mail() function is not working for some reason. It might be being disabled by your host or the mail agent on your site is down. I suggest to contact your hosting tech support to know the actual reason.
To configure your machform to use SMTP, simply edit these lines:
define('USE_SMTP',false); //set this to 'true' to use SMTP define('SMTP_HOST','localhost'); define('SMTP_PORT',25); define('SMTP_AUTH',false); //if your SMTP require authentification, set this to 'true' define('SMTP_USERNAME','YOUR_SMTP_USERNAME'); define('SMTP_PASSWORD','YOUR_SMTP_PASSWORD'); define('SMTP_SECURE',false);
change the values on the right column of the define() above with the SMTP server details provided by your host.
Here's an example configuration using Gmail SMTP:
define('USE_SMTP',true); //set this to 'true' to use SMTP define('SMTP_HOST','smtp.gmail.com'); define('SMTP_PORT',587); define('SMTP_AUTH',true); //if your SMTP require authentification, set this to 'true' define('SMTP_USERNAME','example@gmail.com'); define('SMTP_PASSWORD','mypassword'); define('SMTP_SECURE',true);
MachForm Founder
Posted 13 years ago # -
Had the same problem. After lots of debugging I found out, that my client was using a Microsoft IIS server. The servers mailhost obviously had a problem with with the phpmailer class Machform is using. The particular problem was, that phpmailer is using a \n line ending. Microsofts mailhosts rejects those email because it can only deal with \r\n line endings in email headers. So I edited /lib/class.phpmailer.php and changed line 259 of that file into:
var $LE = "\r\n";
For some reason I had to additionally hard-code the senders adress in the function MailSend() adding a $this->sender ="sender@foo.bar" after $toArr = split(',', $to); at line 468, because otherwise $this->sender was empty and thus the mail() function not executed.
Having made those two changes, everything went smooth.
Posted 13 years ago #
Reply
You must log in to post.