+ #if USE_OPENSSL
+ port = ac_prefs->set_smtpport ? ac_prefs->smtpport :
+ ac_prefs->ssl_smtp == SSL_TUNNEL ? SSMTP_PORT : SMTP_PORT;
+ session->ssl_type = ac_prefs->ssl_smtp;
+ if (ac_prefs->ssl_smtp != SSL_NONE)
+ session->nonblocking = ac_prefs->use_nonblocking_ssl;
+ #else
+ if (ac_prefs->ssl_smtp != SSL_NONE) {
+ if (alertpanel_full(_("Insecure connection"),
+ _("This connection is configured to be secured "
+ "using SSL, but SSL is not available in this "
+ "build of Sylpheed-Claws. \n\n"
+ "Do you want to continue connecting to this "
+ "server? The communication would not be "
+ "secure."),
+ GTK_STOCK_CANCEL, _("Con_tinue connecting"),
+ NULL, FALSE, NULL, ALERT_WARNING,
+ G_ALERTDEFAULT) != G_ALERTALTERNATE) {
+ session_destroy(session);
+ return -1;
+ }
+ }
+ port = ac_prefs->set_smtpport ? ac_prefs->smtpport : SMTP_PORT;
+ #endif
+
+ dialog = send_progress_dialog_create();
+ dialog->session = session;
+ smtp_session->dialog = dialog;
+
+ progress_dialog_list_set(dialog->dialog, 0, NULL,
+ ac_prefs->smtp_server,
+ _("Connecting"));
+
+ if (ac_prefs->pop_before_smtp
+ && (ac_prefs->protocol == A_APOP || ac_prefs->protocol == A_POP3)
+ && (time(NULL) - ac_prefs->last_pop_login_time) > (60 * ac_prefs->pop_before_smtp_timeout)) {
+ g_snprintf(buf, sizeof(buf), _("Doing POP before SMTP..."));
+ log_message(buf);
+ progress_dialog_set_label(dialog->dialog, buf);
+ progress_dialog_list_set_status(dialog->dialog, 0, _("POP before SMTP"));
+ GTK_EVENTS_FLUSH();
+ inc_pop_before_smtp(ac_prefs);
+ }