Opened 5 years ago

Closed 4 years ago

Last modified 3 months ago

#5697 enhancement closed fixed (fixed)

Make the mail example compatible with servers require SSL

Reported by: argonemyth Owned by: itamar
Priority: normal Milestone:
Component: mail Keywords: documentation, example
Cc: jesstess Branch: branches/imap-example-5697
branch-diff, diff-cov, branch-cov, buildbot
Author: itamarst


The example only works with an IMAP server that doesn't require SSL. The script hangs if you try to access servers like I guess a lot of people might try Gmail with this script, it's better to make it compatible with servers that require SSL.

The script should also stop the reactor once the job is finished.

Attachments (1)

5697-imap4client-20120612.patch (7.0 KB) - added by argonemyth 5 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 5 years ago by argonemyth

  • Keywords review added
  • Owner argonemyth deleted

The main reason why it hangs when you try to connect to a Gmail account is that it doesn't initiate a SSL connection if you only change the port number to 993. I fixed the issue by using reactor.connectSSL if an user input '993' as the port number.

A note on Gmail! It's been using 'XOAUTH' as authentication method since 2010. So, only 'clear-text' (the insecure way) is available for gmail accounts. I tested the script on an IMAP server that supports PLAIN auth, worked well.

I also modified the example a bit to fit the coding standard. Please review (5697-imap4client-20120612.patch), Thanks!

Changed 5 years ago by argonemyth

comment:2 Changed 4 years ago by itamar

  • Owner set to itamar

comment:3 Changed 4 years ago by itamarst

  • Author set to itamarst
  • Branch set to branches/imap-example-5697

(In [34752]) Branching to 'imap-example-5697'

comment:4 Changed 4 years ago by itamarst

  • Resolution set to fixed
  • Status changed from new to closed

(In [34756]) Merge imap-example-5697: Improvements to the IMAP client example.

Author: argonemyth Reviewer: itamar Fixes: #5697

comment:5 Changed 3 months ago by hawkowl

  • Keywords review removed

[mass edit] Removing review from closed tickets.

Note: See TracTickets for help on using tickets.