Opened 13 years ago

Last modified 13 years ago

#195 closed defect (FIXED)

SMTP configuration options

Reported by: joar Owned by: Christopher Allan Webber
Priority: minor Milestone: 0.0.5
Component: programming Keywords:
Cc: Parent Tickets:

Description

Add configuration options for SMTP connection.



Change History (6)

comment:1 by joar, 13 years ago

Owner: changed from Joar Wandborg to Christopher Webber
Status: NewFeedback
Merge request at
`https://gitorious.org/mediagoblin/mediagoblin/merge\_requests/16 <https://gitorious.org/mediagoblin/mediagoblin/merge_requests/16>`_



comment:2 by Christopher Allan Webber, 13 years ago

Owner: changed from Christopher Webber to Joar Wandborg
Very close to being mergable, but a few things:


-  What happened to mhost.connect()? Looks like it got removed...
   is this intentional?
-  FakeMhost.login() should probably take *args,*\*kwargs in case
   anyone passes anything in
-  In this:

   ::

           if not mg_globals.app_config['email_smtp_host']:
               mhost = smtplib.SMTP()
           else:
               mhost = smtplib.SMTP(
                   mg_globals.app_config['email_smtp_host'],
                   mg_globals.app_config['email_smtp_port'])


Maybe the port should always be passed in to the first mhost = ? It
has a default, so:

::

                mhost = smtplib.SMTP(
                    port=mg_globals.app_config['email_smtp_port'])



comment:3 by joar, 13 years ago

Updated:
`https://gitorious.org/mediagoblin/mediagoblin/merge\_requests/16 <https://gitorious.org/mediagoblin/mediagoblin/merge_requests/16>`_

``smtplib.SMTP.__init__`` issues the connect() implicitly "if
host"

Cheers,
Joar



comment:4 by joar, 13 years ago

Owner: changed from Joar Wandborg to Christopher Webber

comment:4 by Christopher Allan Webber, 13 years ago

Status: FeedbackClosed
::

    -email_smtp_host = string(default=None)
    +email_smtp_host = string(default='')

and always pulling in the email\_smtp\_host... I see what you did
there ;)

Does that work, always passing in host='' just defaulting to
localhost? I'm assuming you tested that!

Merged.



comment:5 by Will Kahn-Greene, 13 years ago

The original url for this bug was http://bugs.foocorp.net/issues/489 .
Relations:
#24: related

Note: See TracTickets for help on using tickets.