- apply and adapt Bram's patch which allows user to set SMTP AUTH
[claws.git] / src / send.c
index d654bd071721c2e82f86d0fb4f70c4dcd2cb07dd..28308dc2aba316c244bae07295b0307c4a8ada37 100644 (file)
@@ -371,12 +371,20 @@ gint send_message_smtp(PrefsAccount *ac_prefs, GSList *to_list,
 #if USE_SSL
        SEND_EXIT_IF_ERROR((session = smtp_session_new
                                (ac_prefs->smtp_server, port, domain,
-                                user, pass, ac_prefs->ssl_smtp)),
+                                user, pass, ac_prefs->ssl_smtp,
+                                0 
+                                | (ac_prefs->smtp_auth_enable_login ? SMTPAUTH_LOGIN : 0) 
+                                | (ac_prefs->smtp_auth_enable_cram_md5 ? SMTPAUTH_CRAM_MD5 : 0) 
+                                | (ac_prefs->smtp_auth_enable_digest_md5 ? SMTPAUTH_DIGEST_MD5 : 0))),
                           "connecting to server");
 #else
        SEND_EXIT_IF_ERROR((session = smtp_session_new
                                (ac_prefs->smtp_server, port, domain,
-                                user, pass)),
+                                user, pass,
+                                0
+                                | (ac_prefs->smtp_auth_enable_login ? SMTPAUTH_LOGIN : 0) 
+                                | (ac_prefs->smtp_auth_enable_cram_md5 ? SMTPAUTH_CRAM_MD5 : 0) 
+                                | (ac_prefs->smtp_auth_enable_digest_md5 ? SMTPAUTH_DIGEST_MD5 : 0))),
                           "connecting to server");
 #endif