Elxis CMS Forum

Support => Technical support => Topic started by: BeckTek on February 16, 2008, 12:53:04

Title: SMTP email
Post by: BeckTek on February 16, 2008, 12:53:04
Am i able to direct elxis to use gmail smtp servers to send mail?
Title: Re: SMTP email
Post by: Farhad Sakhaei on February 16, 2008, 13:01:08
as i know gmail uses port 465 for smtp , so in elxis you cannot set port of use , if you want you can set it in source manually ...
Title: Re: SMTP email
Post by: datahell on February 16, 2008, 15:15:36
If he does nt have a firewall and his server is able to connect on port 465...
We dont you use a real e-mail?
Title: Re: SMTP email
Post by: Farhad Sakhaei on February 16, 2008, 15:58:01
i read some codes in class.phpmailer , test this for your SMTP host : smtp.gmail.com:465 and check the authentication ... test it , does it work ?
Title: Re: SMTP email
Post by: Farhad Sakhaei on February 16, 2008, 16:07:04
also you can use more than one host as your smtp server , like this : smtp.gmail.com:465;smtp.yoursite.com;smtp.mysite.com:25
Hosts will be tried in order

Edit :
If he does nt have a firewall and his server is able to connect on port 465...
We dont you use a real e-mail?

yes , of course , this is an important matter , you should check if your server and firewall allow you to connect to another server with this port or not , you may get fsockopen error ... thanks john  ;)
Title: Re: SMTP email
Post by: BeckTek on February 17, 2008, 06:36:27
I will try setting the port for the SMTP host when I get a chance.  Firewall and server allowing access through the port is not a problem though.
Title: Re: SMTP email
Post by: BeckTek on February 17, 2008, 11:12:06
I tried setting the port, tried multiple smtp gmail ports, and tried with and without authentication..but I still do not receive the emails.

Do I need to make any other changes to the phpmailer code? or anything else?
Title: Re: SMTP email
Post by: Farhad Sakhaei on February 17, 2008, 11:23:00
if your server firewall and also your server settings allow the script , i think you will get a fsockopen error if your php version is 5 ...
so i think you can't to do this ...
Title: Re: SMTP email
Post by: BeckTek on February 18, 2008, 09:14:31
anyone have any ideas on modifying it so that this is possible?
Title: Re: SMTP email
Post by: datahell on February 18, 2008, 09:30:36
Check if your server can connect to that port. Create an empty php file named test.php and write in it:

Code: (php) [Select]
<?php 
$fp 
= @fsockopen("smtp.gmail.com"465$errno$errstr30);
if (!
$fp) {
    echo 
"Could not connect to GMAIL!<br />\n";
    echo 
"$errstr ($errno)<br />\n";
} else {
    echo 
"Connected successfully on gmail!";
    
fclose($fp);
}
?>

Upload it to your site where elxis is and run it via your browser ( mysite.com/test.php) . If it is successful then I will tell you what you should do to elxis. If not, then you can not do anything (it is a server issue - block).
Title: Re: SMTP email
Post by: BeckTek on February 19, 2008, 09:08:53
I can successfully connect to gmail
Title: Re: SMTP email
Post by: datahell on February 19, 2008, 09:22:58
OK, go to global configuration and add as SMTP host, instead of localhost, this one:

smtp.gmail.com:465

Change the other parameters as needed (SMTP auth: YES, username, password). Should work fine.

If not, then open includes/phpmailer/class.smtp.php and change Port from 25 to 465 everywhere.
Title: Re: SMTP email
Post by: BeckTek on February 27, 2008, 23:35:05
I have tried this and it doesnt work.  Has anyone else tried it and have it working?
Title: Re: SMTP email
Post by: CREATIVE Options on February 28, 2008, 01:09:04
Contact with your hosting provider!
I have test it all and work for me in 3 different server (3 different providers).
Title: Re: SMTP email
Post by: BeckTek on March 01, 2008, 12:13:49
you have tried it specifically with gmail?
Title: Re: SMTP email
Post by: BeckTek on March 25, 2008, 02:49:11
Has anyone tried specifically using gmail for smtp?  I am still trying to get this to work, I think it has something to do with gmails authentication requirements ( the same reason you couldnt use gmail with older Outlook clients.

So if someone has a fix that would be awesome.  If not, I will just do it another way.
Title: Re: SMTP email
Post by: Farhad Sakhaei on March 25, 2008, 09:51:14
We were discuss about this matter in this topic : https://forum.elxis.org/index.php?topic=1789
You should contact your host provider and tell them that let your server to connect thought outgoing port : 465
By solving this issue by your provider , you can connect to the Gmail SMTP by using this address : smtp.gmail.com:465 as your SMTP host
Also you can set the SMTP Auth to Yes in Global Configuration for authentication issue
I think there isn't another way to do this ...
Title: Re: SMTP email
Post by: BeckTek on March 26, 2008, 02:22:54
I will make another look at it.  Not sure what I am doing wrong.

I am my own hosting provider so there is not a problem with the ports being accessible.

Thanks for the response.  I will try again and see if I can get it to work.
Title: Re: SMTP email
Post by: taji on April 22, 2010, 16:57:37
hi I have tested the above it cannot work.

any solution for smtp.gmail.com  for port 465 ?

please advise


Title: Re: SMTP email
Post by: datahell on April 22, 2010, 18:47:55
Why don't you use your local mail server on port 25? You can afterwards forward messages to your gmail account if you wish.
Title: Re: SMTP email
Post by: taji on April 26, 2010, 08:19:46
by forwarding will be inconvenient.

i have tested  it is working using another smtp host of google

gmail-smtp-in.l.google.com

and it works

but however i try to test the contact us module for elxis and it is not working !  how come ?

it works for user registration but not the contact us modue

any advise will be appreciated
Title: Re: SMTP email
Post by: rentasite on April 26, 2010, 09:28:17
by forwarding will be inconvenient.

It will not! What you are trying to do is inconvenient.

Keep in mind that, Gmail smtp host has some limits. Search, find and read about that.  ;)