The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 783 errorHandler->error
/showthread.php 26 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 783 errorHandler->error
/showthread.php 26 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/showthread.php 26 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 909 errorHandler->error
/showthread.php 26 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/showthread.php 26 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/showthread.php 26 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key "mybb" - Line: 1952 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 1952 errorHandler->error
/inc/functions_indicators.php 41 my_set_array_cookie
/showthread.php 629 mark_thread_read
Warning [2] Trying to access array offset on value of type null - Line: 488 - File: inc/db_mysqli.php PHP 8.1.28 (Linux)
File Line Function
/inc/db_mysqli.php 488 errorHandler->error
/showthread.php 722 DB_MySQLi->fetch_field
Warning [2] Undefined property: MyLanguage::$ratings_update_error - Line: 5 - File: showthread.php(732) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/showthread.php(732) : eval()'d code 5 errorHandler->error
/showthread.php 732 eval
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 784 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 784 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 784 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 784 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 784 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 784 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "invisible" - Line: 1506 - File: showthread.php PHP 8.1.28 (Linux)
File Line Function
/showthread.php 1506 errorHandler->error
Warning [2] Undefined variable $threadnotesbox - Line: 30 - File: showthread.php(1533) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/showthread.php(1533) : eval()'d code 30 errorHandler->error
/showthread.php 1533 eval
Warning [2] Undefined variable $addremovesubscription - Line: 79 - File: showthread.php(1533) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/showthread.php(1533) : eval()'d code 79 errorHandler->error
/showthread.php 1533 eval



FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Swift Mailer Module & Gmail SMTP
#1
This thread describes a way to use FT2 and the Swift Mailer module with SMTP to a Gmail account. It described changes to files in the Swift Mailer module v1.0.0-beta-20090409. It enables FT2 to meet the following Gmail requirements:

1) use a SSL (not TLS) encrypted connection to Gmail SMTP
2) authenticate to your Gmail account
3) use the Swift Mailer batchSend function which defaults to only show the individual's To: address on each email and suppress the others in the list (ignores the CC: and BCC: fields)
4) use the Swift Mailer anti-flood function to limit outbound emails to 100 or less per connection

First go into the Modules section and select Swift Mailer. Update the following values:

Enabled - Yes
SMTP Server - smtp.gmail.com
Port - 465
Requires authentication - Yes
Username - example@gmail.com
Password - your Gmail password
Authentication procedure - LOGIN

Next we need to makes 4 changes to the following file.

formtools/modules/swift_mailer/library.php - change 1 of 4

This change requires (adds) the anti-flood class included with the Swift Mailer modules for later use in the script.

change this:
Code:
// include the main files
  $current_folder = dirname(__FILE__);
  require_once("$current_folder/$php_version_folder/Swift.php");
  require_once("$current_folder/$php_version_folder/Swift/Connection/SMTP.php");

  $settings = ft_get_module_settings("", "swift_mailer");
to this:
Code:
// include the main files
  $current_folder = dirname(__FILE__);
  require_once("$current_folder/$php_version_folder/Swift.php");
  require_once("$current_folder/$php_version_folder/Swift/Connection/SMTP.php");
// gmail anti-flood
require_once("$current_folder/$php_version_folder/Swift/Plugin/AntiFlood.php");

  $settings = ft_get_module_settings("", "swift_mailer");

formtools/modules/swift_mailer/library.php - change 2 of 4

This change creates a SSL encrypted connection to Gmail. Notice I commented out the previous line. Gmail offers port 465 for SSL and 587 for TLS encrypted connections. I read that Swift Mailer supports SSL, not TLS, but that information may be dated now.

change this:
Code:
if (empty($port))
    $smtp =& new Swift_Connection_SMTP($smtp_server);
  else
    $smtp =& new Swift_Connection_SMTP($smtp_server, $port);
to this:
Code:
if (empty($port))
    $smtp =& new Swift_Connection_SMTP($smtp_server);
  else
//    $smtp =& new Swift_Connection_SMTP($smtp_server, $port);
// gmail secure connection, ENC_SSL for 465 or ENC_TLS for 587
$smtp =& new Swift_Connection_SMTP($smtp_server, $port, Swift_Connection_SMTP::ENC_SSL);

formtools/modules/swift_mailer/library.php - change 3 of 4

This change brings the anti-flood code into play so you don't exceed Gmail's 100 emails per connection limit. This setting sends out 90 emails per batch then waits 2 seconds before opening up the next connection if needed.

change this:
Code:
if ($settings["requires_authentication"] == "yes")
  {
    $smtp->setUsername($settings["username"]);
    $smtp->setPassword($settings["password"]);
  }

  $swift =& new Swift($smtp);
to this:
Code:
if ($settings["requires_authentication"] == "yes")
  {
    $smtp->setUsername($settings["username"]);
    $smtp->setPassword($settings["password"]);
  }

  $swift =& new Swift($smtp);
//gmail anti-flood
$swift->attachPlugin(new Swift_Plugin_AntiFlood(90, 2), "anti-flood");

formtools/modules/swift_mailer/library.php - change 4 of 4

This change uses the batchSend() instead of the send() function. Notice I commented out the previous line. This will cause individual emails to be sent with just the recipient's email in the To: field. It will not send the entire email list to each recipient. The CC: and BCC: fields are ignored with batchSend().

change this:
Code:
$swift->send($email, $recipients, $from);

  return array($success, $message);
}
to this:
Code:
//  $swift->send($email, $recipients, $from);
// gmail batchSend
$swift->batchSend($email, $recipients, $from);

  return array($success, $message);
}

Finally we need to make 1 change to the following file.

formtools/modules/swift_mailer/php5/ft_library.php - change 1 of 1

This change is not required unless you want to use the test functions. Notice I commented out the previous line again.

change this:
Code:
if (empty($port))
      $smtp =& new Swift_Connection_SMTP($smtp_server);
    else
      $smtp =& new Swift_Connection_SMTP($smtp_server, $port);
to this:
Code:
if (empty($port))
      $smtp =& new Swift_Connection_SMTP($smtp_server);
    else
//      $smtp =& new Swift_Connection_SMTP($smtp_server, $port);
// gmail added (, Swift_Connection_SMTP::ENC_SSL) port 465 for SSL or 587 for TLS
$smtp =& new Swift_Connection_SMTP($smtp_server, $port, Swift_Connection_SMTP::ENC_SSL);

Hopefully this thread will help others looking to use Gmail as their SMTP server. It will work well for an email list with only 1 address to very long lists. Keep in mind that if you try to use this technique to send spam that Gmail will identify the activity by the higher rate of returns and rejects and lock your account for 24-48 hours. Abuse this at your own risk! YMMV!

Chuck
Reply
#2
Terrific post, Chuck.

It's rather tempting to add your code to the module, but I am a little worried about people using it for spam... though I suppose Google are watching for it.
Reply
#3
Ben.

My swift mailer was working fine with gmail till day before yesterday. But from yesterday onwards, the form submission goes to an error page that says.

Fatal error: Uncaught exception 'Swift_ConnectionException' with message 'The SMTP connection failed to start [tls://smtp.gmail.com:465]: fsockopen returned Error Number 110 and Error String 'Connection timed out'' in /home/kerala36/public_html/formtools/modules/swift_mailer/php5/Swift/Connection/SMTP.php:309 Stack trace: #0 /home/kerala36/public_html/formtools/modules/swift_mailer/php5/Swift.php(216): Swift_Connection_SMTP->start() #1 /home/kerala36/public_html/formtools/modules/swift_mailer/php5/Swift.php(101): Swift->connect() #2 /home/kerala36/public_html/formtools/modules/swift_mailer/library.php(196): Swift->__construct(Object(Swift_Connection_SMTP)) #3 /home/kerala36/public_html/formtools/global/code/emails.php(1102): swift_send_email(Array) #4 /home/kerala36/public_html/formtools/global/code/emails.php(1070): ft_process_email_template('2', 2, '4') #5 /home/kerala36/public_html/formtools/process.php(317): ft_send_emails('on_submission', '2', 2) #6 /home/kerala36/public_html/formtools/process.php(49): ft_process_for in /home/kerala36/public_html/formtools/modules/swift_mailer/php5/Swift/Connection/SMTP.php on line 309

I haven't made any changes with the configuration or anything. please guide.
Reply
#4
when testing the SWIFT MAILER , i am getting the following error.

There was a problem communicating with SMTP: The SMTP connection failed to start [tls://smtp.gmail.com:465]: fsockopen returned Error Number 110 and Error String 'Connection timed out'
Reply
#5
Hi, How you solve it , i got same error regards.


(Sep 11th, 2009, 12:07 AM)sujith Wrote: when testing the SWIFT MAILER , i am getting the following error.

There was a problem communicating with SMTP: The SMTP connection failed to start [tls://smtp.gmail.com:465]: fsockopen returned Error Number 110 and Error String 'Connection timed out'

Reply
#6
Hello,

I'm having exactly the same error.

Code:
There was a problem communicating with SMTP: The SMTP connection failed to start [ssl://smtp.gmail.com:465]: fsockopen returned Error Number 110 and Error String 'Connection timed out'

Also, in module I'm entering the correct values for my SMTP server, and the same...

Code:
There was a problem communicating with SMTP: The SMTP connection failed to start [tls://mail.mydomain.com:587]: fsockopen returned Error Number 0 and Error String ''

I know the values are correct, because I'm using them also in Livezilla.

Is anybody getting the same errors?
Reply
#7
I'm getting the same error "110" during the test. I'm at a total loss. Anyone?
Just an update, I'm getting this error message when using any SMTP configuration NOT hosted on the same domain as my FT installation. Not just Gmail. I've submitted a ticket to my web host to see if the problem is on that end. Will update when I find out.
Final update for everyone. I heard back from the web host, who said:

Quote:The secure port(465) in the firewall was not allowed for outgoing connections.

They enabled it and it works flawlessly now.

YAY!
Not a FT employee, just a FT user lending a hand. If I've been helpful, please rate.

[Image: giraffe_long_85.gif]
Reply
#8
Very good to hear!

btw, I'm going to sticky this post - I see it's at 10,000+ page views (!?); clearly it's of interest to people.

- Ben

Reply
#9
Nice!

But opening the secure port(465) port, only makes now the GMail smtp to work.

Can I kindly ask you, Ben, that you provide us with a list of the ports Swift Module uses to connect on?

I really want to use my own SMTP server.

Thank you!!
Reply
#10
I'm having this same issue/error. I've tried changing code where applicable, and now have reverted back to the stock code. My Host says that port 465 is open for ssl connections outbound to any SSL enabled SMTP connection. I still get the same error. It doesn't matter if I use a local SMTP on the host or anything outside, I get this same error. Anyone else got any ideas of where to look or other possible solutions? It doesn't work in either the test mode inside swift mailer, or with forms. PHP mail will work but only with addresses within the domain, and I need to be able to send attachments. I also tried the gmail route - established an account and made all changes accordingly, but no luck there either. DOH!! I dunno where to go from here....

Peace,

Bill
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)