~ubuntu-branches/ubuntu/saucy/geary/saucy-updates

« back to all changes in this revision

Viewing changes to src/engine/imap-db/outbox/smtp-outbox-folder.vala

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-10-10 17:40:37 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20131010174037-5p5o4dlsoewek2kg
Tags: 0.4.0-0ubuntu1
New stable version

Show diffs side-by-side

added added

removed removed

Lines of Context:
183
183
                break;
184
184
            }
185
185
            
 
186
            // Get SMTP password if we haven't loaded it yet and the account needs credentials.
 
187
            // If the account needs a password but it's not set or incorrect in the keyring, we'll
 
188
            // prompt below after getting an AUTHENTICATION_FAILED error.
 
189
            if (_account.information.smtp_credentials != null &&
 
190
                !_account.information.smtp_credentials.is_complete()) {
 
191
                try {
 
192
                    yield _account.information.get_passwords_async(
 
193
                        CredentialsMediator.ServiceFlag.SMTP);
 
194
                } catch (Error e) {
 
195
                    debug("SMTP password fetch error: %s", e.message);
 
196
                }
 
197
            }
 
198
            
186
199
            // Convert row into RFC822 message suitable for sending or framing
187
200
            RFC822.Message message;
188
201
            try {
212
225
                    // Retry immediately (bug 6387)
213
226
                    should_nap = false;
214
227
                    
 
228
                    // At this point we may already have a password in memory -- but it's incorrect.
 
229
                    // Delete the current password, prompt the user for a new one, and try again.
215
230
                    try {
216
231
                        if (yield _account.information.fetch_passwords_async(
217
 
                            CredentialsMediator.ServiceFlag.SMTP))
 
232
                            CredentialsMediator.ServiceFlag.SMTP, true))
218
233
                            report = false;
219
234
                    } catch (Error e) {
220
235
                        debug("Error prompting for IMAP password: %s", e.message);