Commits

Anonymous committed 04c74de

doc tests

  • Participants
  • Parent commits 5f4def2

Comments (0)

Files changed (4)

File docs/conf.py

 # built documents.
 #
 # The short X.Y version.
-version = '0.4'
+version = '0.5'
 # The full version, including alpha/beta/rc tags.
-release = '0.4'
+release = '0.5'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.

File docs/index.rst

 
 * **DEFAULT_MAIL_SENDER** : default **None**
 
+* **DEFAULT_MAX_EMAILS** : default **None**
+
+* **MAIL_FAIL_SILENTLY** : default **True**
+
 In addition the standard Flask ``TESTING`` configuration option is used by **Flask-Mail**
 in unit tests (see below).
 
 
     mail.send(msg)
 
+If the setting **MAIL_FAIL_SILENTLY** is **True**, and the connection fails (for example, the mail
+server cannot be found at that hostname) then no error will be raised, although of course no emails will
+be sent either.
+
+
 Bulk emails
 -----------
 
 
 The connection to your email host is kept alive and closed automatically once all the messages have been sent.
 
+If you are going to run a mass email batch, be careful to pass in the ``max_emails`` parameter, which sets the maximum
+number of emails that will be sent before reconnecting. Some mail servers set a limit on the number of emails sent
+in a single connection. You can also set this globally with the **DEFAULT_MAX_EMAILS** setting.
+
 Attachments
 -----------
 

File flaskext/mail/__init__.py

 
 
 class Mail(object):
-    
     """
     Manages email messaging
 
 
         You must have blinker installed in order to use this feature.
         :versionadded: 0.4
-
         """
 
         if not email_dispatched:
         Opens a connection to the mail host.
         
         :param max_emails: the maximum number of emails that can 
-        be sent in a single connection. If this number is exceeded
-        the Connection instance will reconnect to the mail server. The
-        DEFAULT_MAX_EMAILS config setting is used if this is None.
+                           be sent in a single connection. If this 
+                           number is exceeded the Connection instance 
+                           will reconnect to the mail server. The
+                           DEFAULT_MAX_EMAILS config setting is used 
+                           if this is None.
         """
         return Connection(self, max_emails) 
                           

File flaskext/mail/connection.py

         self.send(Message(*args, **kwargs))
 
 
-
-