Saturday, April 4, 2009

SMTP Gmail for Joomla

If you use joomla and your webhost does not give a support for sendmail or phpmailer function you just have achoice to use smtp. One of the hack to using smtp is use google/gmail account. Let’s do it.

You will have to locate the file that will be changed based on which version of Joomla! you have.

includes/phpmailer/class.phpmailer.php file in 1.0.x

libraries/phpmailer.php file in 1.5

on line 537 or close to it

The original code is:
if(strstr($hosts[$index], ":"))
list($host, $port) = explode(":", $hosts[$index]);
else
{
$host = $hosts[$index];
$port = $this->Port;
}
You must change this to:
if (preg_match('#(([a-z]+://)?[^:]+):(\d+)#i', $hosts[$index], $match))
{
$host = $match[1];
$port = $match[3];
}
else
{
$host = $hosts[$index];
$port = $this->Port;
}

And then go to your global configuration settings in your joomla administration panel.

change the smtp host to ssl://smtp.gmail.com:465

make sure all of your other mail settings are set and gmail might need to allow pop mail. (that can be changed in the gmail settings when you log in to your email.)
be sure to include your full email especially if you use your own domain with google aps.

example: email@domain.com or email@gmail.com

Type rest of the post here

Categories: , ,

Related Posts:

  • Istilah Dunia MarketingIstilah dalam Dunia MarketingSejumlah mahasiswa bertanya pada dosennya tentang arti dari beberapa istilah dalam dunia marketing. Agar lebih mudah dipahami ia menjelaskannya dengan sejumlah analogi:1. Ada gadis cantik di sebua… Read More
  • Simple Ubuntu DeepFreeze ScriptWhen my computer laboratory changes it operation system from XP to Ubuntu, there is a lot of problem found...One of them is how we can substitute the Deep Freeze program,, because of our Lab. has a lot of user and very need a… Read More
  • Arti Sebuah Nama"What's in a name? That which we call a rose by any other name would smell as sweet." Romeo&Juliet – Shakespeare Nama saya Johannes Dwi Cahyo Kristanto. Katanya nama itu doa dari orang tua. Bener banget sepertinya. Nama … Read More
  • Akhirnya Ubuntu lagiDari kemarin saya cukup direpotkan dengan tukeran laptop sama kakak. Kakak pakai Acer saya dan saya ganti pakai Axioo. Sebenarnya secara kualitas ya jelas bagusan si Acer biarpun seri lama Acer Aspire 5050 tapi ketahanan dan … Read More
  • Pasangan Hidup (Bahan PA)Memilih pasangan hidup merupakan keputusan yang sangat penting karena bersifat permanen dalam kehidupan seseorang. Anda tentunya tidak menginginkan terjadi perceraian atau perpisahan begitu anda telah berada di tengah-tengah … Read More

0 komentar:

Copyright © 2025 Johannes Dwi Cahyo | Powered by Blogger

Design by Anders Noren | Blogger Theme by NewBloggerThemes.com | BTheme.net      Up ↑