Search

I'm hitting a bit of a wall with getting SMTP to send a response email via gmail for a form I've built and was curious if anyone might have some pointers. I've had success with setting this up properly in other ensembles, which makes this especially puzzling…

I've checked that SMTP is enabled on the server, but repeatedly get errors in the manifest log reporting that it's unable to open the socket-connection refused:

02/17/2014 10:36 pm > Warning: GenericErrorHandler 2: stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465  (Connection refused) on line 473 of file /home/pinstackbowl1/public_html/symphony/lib/toolkit/class.smtp.php
02/17/2014 10:36 pm > UNKNOWN: Email Gateway Error (SectionEvent): Unable to open socket. Connection refused
02/17/2014 10:36 pm > Warning: GenericErrorHandler 2: stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465  (Connection refused) on line 473 of file /home/pinstackbowl1/public_html/symphony/lib/toolkit/class.smtp.php
02/17/2014 10:36 pm > UNKNOWN: Email Gateway Error (SectionEvent): Unable to open socket. Connection refused

I've configured the preferences a couple different ways, using SSL (port 465 as well as 25) and TLS (port 587).

Is there a way to determine whether this is symphony related or a server issue? Or, what are some other things I could check into to narrow this down?

Thanks in advance, LB

Not sure if this will make any difference, but I'm using smtp.googlemail.com in the Host field, port 465 and SSL encryption, which works for me.

I get the same issue using Mandrill - I have also tried Gmail in a few guises too.

I will try the googlemail approach and report back...

googlemail didn't work.

Mandrill as it turns out DID work, but it is very slow on account of a ton of errors:

03/20/2014 12:20 pm > Warning: GenericErrorHandler 2: chmod(): Operation not permitted on line 865 of file *****/httpdocs/symphony/lib/toolkit/class.general.php
03/20/2014 12:22 pm > UNKNOWN: SymphonyErrorPage 0 - The page you requested does not exist. on line 650 of  *****/httpdocs/symphony/lib/core/class.symphony.php
03/20/2014 12:22 pm > Warning: GenericErrorHandler 2: chmod(): Operation not permitted on line 865 of file *****/httpdocs/symphony/lib/toolkit/class.general.php

any ideas?

I am encountering the same problems. Has anybody come with a solution?

For Gmail you must use "SSL" (not TLS) and port 465.

Thank you. It seems to be working with Gmail. Does anybody know the configurations for Mandrill? I'm following those from my Mandrill setup account but it gives me the same error - "Unable to open socket."

username
smtp.mandrillapp.com
587
SSL
API key for password

@ovidust this is what I have for Mandrill and it works fine. note that for username I think you have to use the email address with which the account is registered.

'host' => 'smtp.mandrillapp.com',
'port' => '587',
'secure' => 'tls',
'auth' => '1',

I am facing similar problems.

Has anybody ever managed to get this working with Microsoft Office 365 Server?

I am constantly getting these errors:

01/18/2019 3:41 pm > Warning: GenericErrorHandler 2: streamsocketclient(): unable to connect to tcp://designbits.mail.protection.outlook.com:25 (Connection timed out) on line 503 of file /www/htdocs/w304g46c/www.designbits.de/symphony/lib/toolkit/class.smtp.php 01/18/2019 3:41 pm

Fatal Error: Email Gateway Error (SectionEvent): Unable to open socket. Connection timed out

This is what I've got:

'email_smtp' => array(
    'helo_hostname' => 'smtp.office365.com',
    'from_name' => 'test@designbits.de',
    'from_address' => 'test@designbits.de',
    'host' => 'designbits.mail.protection.outlook.com',
    'port' => '587',
    'secure' => 'tls',
    'auth' => '1',
    'username' => 'test@designbits.de',
    'password' => 'secret',
),

The HELO hostname must be your server's name. The host must be the FQDN of the email server — you should double-check that it's correct.

The from_name should be left empty if it does not differ from the address. Or it might be any name (e.g. "DesignBits").

Hi Michael,

Thanks. I double checked that all parameters are set correctly.

A colleague tested the same configuration on his (Unix) server and every single email got through. (Without using Symphony, though.)

But on my shared hosting / Apache / PHP 5.6 / Symphony server, not a single email gets delivered.

Instead, in my Symphony log I keep getting this:

Warning: GenericErrorHandler 2: fgets(): SSL: Connection reset by peer on line 427 of file /www/htdocs/w007f26h/www.designbits.de/symphony/lib/toolkit/class.smtp.php

Why does peer reset the connection when I try to send email to it through Symphony?

I'm really lost here...

I double checked that all parameters are set correctly.

The HELO that you are using is definitely wrong, and many email servers will throw you out if you pretend to be someone else (especially the receiving server itself, which is probably not the case here).

tested the same configuration on his (Unix) server

Honestly? Including the HELO?

Try and test systematically. Use a different SMTP account (with a different provider), for example. Does it work?

Problem solved. My shared host won't allow external SMTP hosts. I have to send through the host's SMTP server and it works now. Took me a few days to figure this out...

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details