Error With Connecting Server Socket Timeout To Connect Smtp.gmail.com
mozillaZine is an independent Mozilla community and advocacy site. We're not affiliated or endorsed by the Mozilla Corporation but we love them just the same. Proudly Powered by phpBB © phpBB Group © 1998-2015 mozillaZine All Rights Reserved
×383 email-notification ×43 maven ×43 email ×37 Asked: Aug 18 '14, 4:50 a.m. Seen: 9,030 times Last updated: Aug 18 '14, 5:38 a.m. Related questions Academic Jazz Hub - email notification not working RTC 4.0.0.1 Email invitations not working: Bad gateway How to get work item history in e-mail notification? Prevent creator from automatically being added as a subscriber Do you http://forums.mozillazine.org/viewtopic.php?f=39&t=2023655 like to have a customizable email template for DNG (DOORS Next Generation) ? [2015] Internal error during email settings setup in Jazz team server Send a custom email on evenement RC 5.0.2 - E-mail notifications also triggering on non-working days Where can I find the settings that cause https://jazz.net/forum/questions/161190/email-notification-through-gmail-connection-timeout-to-smtpgmailcom587 RTC work item notification emails to time out and not be sent? How to notify all users of RTC? FAQ - How this Forum works Email notification through Gmail: Connection Timeout to smtp.gmail.com:587 0 Victor Rentea (6●1●1) | asked Aug 18 '14, 4:50 a.m. I get the following error [ERROR] Sending the email to the following server failed : smtp.gmail.com:587: Could not connect to SMTP host: smtp.gmail.com, port: 587: Connection timed out -> [Help 1]The plugin I'm trying to use to send the mail is the following:
here for a quick overview of the site Help Center Detailed answers to any questions you might have http://stackoverflow.com/questions/25449496/swiftmailer-gmail-connection-timed-out-110 Meta Discuss the workings and policies of this site About Us https://www.mediawiki.org/wiki/Topic:Rv2l63onlbgz9uuu Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just error with like you, helping each other. Join them; it only takes a minute: Sign up Swiftmailer Gmail Connection timed out #110 up vote 3 down vote favorite I want to send emails using gmail's smtp with the PHP script posted below using Swiftmailer. Now this works fine on my own webserver. But when I used it on error with connecting the webserver of the people I'm creating this for, I get an exception: Fatal error: Uncaught exception 'Swift_TransportException' with message 'Connection could not be established with host smtp.gmail.com [Connection timed out #110]' in ... What could be the problem? I'm assuming its got to do with the difference in server settings, because the code works on my own webserver. I've checked with phpinfo() the following: - Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls - OpenSSL support enabled - OpenSSL Library Version OpenSSL 1.0.1e-fips 11 Feb 2013 This is my PHP code: $emailname = MY_GMAIL_ACCOUNT_USERNAME; $emailpass = MY_GMAIL_ACCOUNT_PASSWORD; $transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465, "ssl") ->setUsername($emailname) ->setPassword($emailpass); $mailer = Swift_Mailer::newInstance($transport); $message = Swift_Message::newInstance($emailtitle) ->setFrom(array($emailname.'@gmail.com' => $emailsender)) ->setTo(array($emailrecp)) ->setBody($emailbody,'text/html'); $result = $mailer->send($message); smtp swiftmailer share|improve this question asked Aug 22 '14 at 14:33 appel 164214 I got this problem too. I solved it by changing encryption from 'tls' to 'ssl'. I see you are using 'ssl' so no point providing this as an answer.
May 2014 2 years ago 12 Edit title History Permalink Summarize Hide topic Rachel1208 (talkcontribs) Firstly, I write this in Localsettings: //2014-5-20 ---smtp,email $wgSMTP = array( 'host' => 'ssl://smtp.gmail.com', 'IDHost' => 'gmail.com', 'port' => 465, 'username' => 'myaddressg@gmail.com', 'password' => 'mypsw', 'auth' => true ); And then I do this : install pear mail install pear net_smtp Unfortunately, the wiki shows that error message as: Failed to connect to ssl://smtp.gmail.com:465 [SMTP: Failed to connect socket: Connection timed out (code: -1, response: )] I do this later according to some advice from others: sudo pear install Auth_SASL2-0.1.0 sudo pear install mail_mime sudo apt-get install postfix The error message never disappear. I try the whole process in two new server, and the mail function never work successfully. Can anyone help me ? Thank you a million !!! Reply 09:24, 20 May 2014 2 years ago Permalink Hide Rachel1208 (talkcontribs) UPDATE: I write this instead of configuration of gmail: $wgSMTP = array( 'host' => 'ssl://smtp.163.com', 'IDHost' => '163.com', 'port' => 25, 'username' => 'myaddress@163.com', 'password' => 'mypsw', 'auth' => true ); The error message is : Failed to connect to ssl://smtp.163.com:25 [SMTP: Failed to connect socket: Connection refused (code: -1, response: )] I really do not know what should I do....help....help...help... Reply 09:45, 20 May 2014 2 years ago Permalink Hide Rachel1208 (talkcontribs) The lonely me update lonelyRachel1208 (talk) gege@gege-ThinkCentre-M58p:~/mediawiki-1.22.4-0$ telnet smtp.gmail.com 465 Trying 173.194.79.108... ^C gege@gege-ThinkCentre-M58p:~/mediawiki-1.22.4-0$ telnet smtp.gmail.com 465 Trying 74.125.25.109... Trying 74.125.25.108... Trying 2607:f8b0:400e:c01::6d... telnet: Unable to connect to remote host: Network is unreachable Regards~ Reply 05:20, 21 May 2014 2 years ago Permalink Hide Rachel1208 (talkcontribs) Hi, I think I find the problem,but have no idea to solve it: When I use th