Doesn’t work “contact mail info” + Joomla site builder.

Posted: February 3, 2013 in php

This was very interesting fix for me. I have investigate this issue and fixed it temporary. One of our clients came across issue with his contact form is not working. He is getting error message as “cannot submit email”. His two of the domain or accounts also having same issue.

Step 1:
—>Check which site builder is using
—> If it is Joomla site builder ask their admin login details
—> Login as admin

Step 2:
Here is how to change from PHP Mail Function to Sendmail:

1. Log in as an admin on the backend of your joomla (http://localhost/”name_of_your_site”/administrator)
2. On the menu bar (on top) go to Site > Global Configuration
3. You’ll see on left side three links “Site | System | Server” (Right under “Global Configuration” phrase)
4. Click on the Server
5. Then find on your right “Mail Settings” box
6. In the Mailer drop down menu change from PHP Mail Function to Sendmail

For example :

Mailer: PHP mail function
Mail from: info@mydomain.com
From Name:  My Name
Sendmail Path /usr/sbin/sendmail
SMTP Authentication No

Step3:
Make sure the above settings is perfect.

Now the real solution is given below:

a. Locate /home/username/public_html/libraries/phpmailer

b. vi phpmailer.php

c. An incorrect argument $params is being passed to the mail() function at line 769

The line needs to be edited to remove this parameter.
Change:
Code:
$rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);
to
Code:
$rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header);

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s