CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Configuring SMTP Outgoing Mail
Pages: [1] 2

Author Topic: Configuring SMTP Outgoing Mail  (Read 18204 times)

csm678

  • Guest
Configuring SMTP Outgoing Mail
December 08, 2008, 02:52:13 pm
Hello.  So I am attempting to send a receipt for each contribution i enter into the system and this is the following message i receive.  I am trying to route my outgoing email through our google apps account... i have all the correct values configured but this message prompts when i try to send the receipt:

The mail library returned the following error message: Failed to connect to smtp.gmail.com:465 [SMTP: Failed to connect socket: Connection timed out (code: -1, response: )]

Can someone help me with this?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Configuring SMTP Outgoing Mail
December 08, 2008, 05:14:42 pm

did you set it up as mentioned here: http://forum.civicrm.org/index.php/topic,2323.msg9879.html#msg9879

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

csm678

  • Guest
Re: Configuring SMTP Outgoing Mail
December 09, 2008, 09:43:16 am
i set everything up according to that link and it still doesn't work.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Configuring SMTP Outgoing Mail
December 09, 2008, 11:30:17 am

sorry, cant help you much out here (since we dont use / have a google apps account).

Your best bet might be to get someone familiar with php/mysql to help you debug and fix this issue

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Configuring SMTP Outgoing Mail
December 09, 2008, 01:41:15 pm

are you on macosx?

i've spent a fair part of the morning trying to get this to work. does not help that google apps is flaky today, i'll have a better report later today

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Configuring SMTP Outgoing Mail
December 09, 2008, 06:11:28 pm

i spent a lot of time debugging what turned out to be an incredibly stupid error on my part

rather than using:

ssl://mail.gmail.com/

i was using

ssl://mail.google.com/

which was giving me the same connection refused error. You might want to check your settings again and ensure you are using 'gmail' not 'google' :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

csm678

  • Guest
Re: Configuring SMTP Outgoing Mail
December 10, 2008, 07:39:53 am
Thanks lobo.  I finally got this to work by setting the outbound mail back to the default values.  I think this has done the trick, thank you so much for your help!

aaronsperling

  • Guest
Re: Configuring SMTP Outgoing Mail
December 13, 2008, 02:48:16 pm
Hi -

I'm battling with this exact same issue and have been for about a month.

What default values corrected for you? I've checked everything several times and no luck....

any help is appreciated, I love civi but this SMTP stuff has been a pain in my... :)

Thanks.
-Aaron
atlanticindoor.org

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Configuring SMTP Outgoing Mail
December 13, 2008, 03:46:29 pm

you might to give a few more details of your install and whether you are using google apps etc. Also what error message are you getting?

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

aaronsperling

  • Guest
Re: Configuring SMTP Outgoing Mail
December 14, 2008, 06:24:29 am
Sure -

I'm running Civi 2.0.5 on Joomla 1.5.7

Php version is 5.2.6
SQL is built on 5.0.67-community

My web server is unix with Open SSL enabled.

Everything about Civi seems to work fine, except email. I'm attempting to use google apps for my email. The site is for a large non-profit org that needed a lot of emails, and that was the best solution for us.

When I attempt to send I get the following error:

The mail library returned the following error message: Failed to connect to ssl://smtp.gmail.com:465 [SMTP: Failed to connect socket: Connection timed out (code: -1, response: )]

At the bottom of the error is also the following:

Error Details:

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=>
    [message] => not connected
    [mode] => 16
    [debug_info] =>
    [type] => PEAR_Error
    [user_info] =>
    [to_string] => [pear_error: message="not connected" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]


I have all the parameters entered as noted in the previous posts here...

Thanks for any\all help.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Configuring SMTP Outgoing Mail
December 14, 2008, 07:49:50 am

can you try using port 587 (instead of 465)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

aaronsperling

  • Guest
Re: Configuring SMTP Outgoing Mail
December 14, 2008, 08:02:53 am
Just attempted:

The mail library returned the following error message: Failed to connect to ssl://smtp.gmail.com:587 [SMTP: Failed to connect socket: (code: -1, response: )]

Error Details:

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=>
    [message] => not connected
    [mode] => 16
    [debug_info] =>
    [type] => PEAR_Error
    [user_info] =>
    [to_string] => [pear_error: message="not connected" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]
)

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Configuring SMTP Outgoing Mail
December 14, 2008, 09:48:52 am

If you have shell access on your host, can you try:

% telnet smtp.gmail.com 467

and

% telnet smtp.gmail.com 587

also can you run the following php script:

Code: [Select]
<?php
$fp 
= fsockopen("ssl://smtp.gmail.com", 465, $errno, $errstr, 3);
if (!
$fp) {
    echo 
"$errstr ($errno)<br />\n";
 } else {
    
$out = "GET /~lobo/foo.html HTTP/1.1\r\n";
    
$out .= "Host: www.example.com\r\n";
    
$out .= "Connection: Close\r\n\r\n";
    
fwrite($fp, $out);
    while (!
feof($fp)) {
        echo 
fgets($fp, 128);
    }
    
fclose($fp);
 }
?>


lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

dominion

  • Guest
Re: Configuring SMTP Outgoing Mail
December 18, 2008, 12:52:16 pm
220 mx.google.com ESMTP q20sm4163691pog.22 502 5.5.1 Unrecognized command. q20sm4163691pog.22 502 5.5.1 Unrecognized command. q20sm4163691pog.22

is the output of that php script.

I'm having the exact same problem

The mail library returned the following error message: Failed to connect to ssl://mail.gmail.com:465 [SMTP: Failed to connect socket: php_network_getaddresses: getaddrinfo failed: Name or service not known (code: -1, response: )]

I've been reading the forums for a few weeks now, and have solved 95% of my problems with civicrm.  This is the last one, and i'll be able to bring it live.
« Last Edit: December 18, 2008, 12:56:38 pm by dominion »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Configuring SMTP Outgoing Mail
December 18, 2008, 02:36:45 pm

can you fix your settings to:

ssl://smtp.gmail.com rather than ssl://mail.gmail.com

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Configuring SMTP Outgoing Mail

This forum was archived on 2017-11-26.