
SMTP Mail Settings
Its been a long long time since the last post that I had created on this blog, I am quite “busy2x” on my work but here we go again, I am posting a new post maybe this is not a new problem to all of us but for the benefit of others, that maybe experiencing the same problem here is the little and quick solution on how to use Gmail STMP to send an email from your Joomla site.
First open the file called phpmailer.php from your libraries/phpmailer directory of your Joomla installation and locate the line 537 on your phpmailer.php file and look for the following line of code:
Old:
Commented Original Code Fix by
if(strstr($hosts[$index], “:”))
list($host, $port) = explode(”:”, $hosts[$index]);
else
{
$host = $hosts[$index];
$port = $this->Port;
}
New Code:
if (preg_match(’#(([a-z]+://)?[^:]+):(\d+)#i’, $hosts[$index], $match))
{
$host = $match[1];
$port = $match[3];
}
else
{
$host = $hosts[$index];
$port = $this->Port;
}
And lastly save the file and configure your site like the image above.
This hack or fix is not originally mind but sorry to the onwner of this code I do not remember his/her name so if you found this post across the net please have a quick post or reply from this post so that I can add to you the appreciation.
Hope this will help you guys.
Good luck!
































