Page 1 of 1

getting started

Posted: Sat Apr 12, 2008 11:57 am
by bazaarboy
stumbled at the first hurdle, so any help is appreciated,
I run wamp 1.65 and using swift 3.33 for php5 (from home server)
I'm trying to perform the basic smoke test by logging onto:

../tests/smokes/runTestOfBasicSend.php

using my gmail account, but get this error:

Image

The SMTP connection failed to start [tls://smtp.gmail.com:25]: fsockopen returned Error Number 0 and Error String ''

The only change in the code i made was in the TestConfiguration.php file, as follows:

Code: Select all

 
  /*
   * EVERYTHING BELOW IS FOR SMOKE TESTING ONLY
   */
   
  /**
   * The connection tye to use in testing
   * "smtp", "sendmail" or "nativemail"
   */
  const CONNECTION_TYPE = "smtp";
  /**
   * An address to send emails from
   */
  const FROM_ADDRESS = "me@gmail.com";
  /**
   * The name of the sender
   */
  const FROM_NAME = "From Name";
  /**
   * An address to send emails to
   */
  const TO_ADDRESS = "to@add.com";
  /**
   * The name of the recipient
   */
  const TO_NAME = "To Name";
  
  /*
   * SMTP SETTINGS - IF APPLICABLE
   */
   
  /**
   * The FQDN of the host
   */
  const SMTP_HOST = "smtp.gmail.com";
  /**
   * The remote port of the SMTP server
   */
  const SMTP_PORT = 25;
  /**
   * Encryption to use if any
   * "ssl", "tls" or false
   */
  const SMTP_ENCRYPTION = "tls";
  /**
   * A username for SMTP, if any
   */
  const SMTP_USER = "me@gmail.com";
  /**
   * Password for SMTP, if any
   */
  const SMTP_PASS = "pw";
 
Any suggestions? thanks!

Re: getting started

Posted: Sat Apr 12, 2008 12:01 pm
by Chris Corbyn
Port 465... not 25 for Gmail.

Re: getting started

Posted: Sat Apr 12, 2008 12:36 pm
by bazaarboy
thanks Chris, much appreciated

Re: getting started

Posted: Sat Apr 12, 2008 3:36 pm
by bazaarboy
getting used to swiftmailer nicely - unfortunately ran into some probs when I tried my hosted service,

I ftp-ed all the files to my www directory, and the basic smoke test gave an error:

Error: The SMTP connection failed to start [tls://smtp.gmail.com:465]: fsockopen returned Error Number 110 and Error String 'Connection timed out'
Log Information

++ Log level changed to 4
++ Forcing ESMTP mode. HELO is EHLO.
++ Forcing ESMTP mode. HELO is EHLO.
++ Trying to connect...
++ Trying to connect to SMTP server at 'tls://smtp.gmail.com:465
!! The SMTP connection failed to start [tls://smtp.gmail.com:465]: fsockopen returned Error Number 110 and Error String 'Connection timed out'


I assume this must be because the hosting company's server config is different to mine, although its hard to be sure. I tried phpinfo but that gave very large list of config options, with a number being different to the local setup at home.

I made sure the tests/tmp folder was chmod 0777, but still no luck

any ideas?

Re: getting started

Posted: Sat Apr 12, 2008 8:02 pm
by Chris Corbyn
Your host are blocking the connection attempt. What host do you use?

Re: getting started

Posted: Sun Apr 13, 2008 4:30 am
by bazaarboy
i run two websites, amateurishly lol, i use two hosts:

1. Webfusion, http://www.webfusion.co.uk/webhosting/
2. Eris Hosting, http://www.erishosting.com/hosting/

I started the second service with a view to migrate both websites over to them, but still use both currently.
Both hosts give the same error when running the smoke test...

Re: getting started

Posted: Sun Apr 13, 2008 5:12 am
by Chris Corbyn
I don't have any knowledge of their policies, but speak to them and explain that you are unable to establish a remote TLS connection on port 465.

Are you using PHP4 or 5 by the way? If you're using PHP5 does TLS show as an available protocol here? If you have PHP4 there's diddly-squat way to tell without asking the person who compiled it.

Code: Select all

print_r(stream_get_transports());
 
/* -- On my machine:
Array
(
    [0] => tcp
    [1] => udp
    [2] => unix
    [3] => udg
    [4] => ssl
    [5] => sslv3
    [6] => sslv2
    [7] => tls
)*/

Re: getting started

Posted: Sun Apr 13, 2008 7:17 am
by bazaarboy
using PHP5 both at home and with the hosting services...
it looks like TLS may available, having run stream_get_transports

home setup = Array ( [0] => tcp [1] => udp [2] => ssl [3] => sslv3 [4] => sslv2 [5] => tls )

hosting # 1 = Array ( [0] => tcp [1] => udp [2] => unix [3] => udg [4] => ssl [5] => sslv3 [6] => sslv2 [7] => tls )

hosting # 2 = Array ( [0] => tcp [1] => udp [2] => unix [3] => udg [4] => ssl [5] => sslv3 [6] => sslv2 [7] => tls )