Files changed (3)
+"""Simple function to send email ported from pythonweb.org web.mail by James Gardner <firstname.lastname@example.org>
+The mail module provides a simple function ``mail()`` which can be used to send emails as shown in the example below::
+If you get an error like ``socket.error: (10060, 'Operation timed out')`` it is likely that the SMTP address you specified either doesn't exist or will not give you access.
+ Describes which method to use to send the email. Can be ``'smtp'`` or ``'sendmail'`` but ``method`` only needs to be specified if both ``smtp`` and ``sendmail`` parameters are specified otherwise the method that is defined is used and the value of ``method`` is ignored.
+ Should be set to ``True`` if recipients are to be blocked from seeing who else the email was sent to (ie recipeints are bcc'd)
+ The name and email address of the person sending the email in the form: ``"sender name <email@example.com>"``. Should only be specified if ``reply_name`` and ``reply_email`` are not specified.
+ The second part of the content-type, eg ``'plain'`` for a plain text email, ``'html'`` for an HTML email.
+The module also provides a method ``build_reply()`` which can be used to put the name and email address into the format required for the ``reply`` parameter of the ``mail()`` helper::
+ reply - The name and address of the person sending the email in the form: "sender name <firstname.lastname@example.org>"
+ raise Exception("The path '%s' doesn't exist. Please check the location of sendmail."%params['sendmail'])
+"""Time module from web.util.time for turning a string into seconds based on code submited to the PythonWeb mailing list by Felix Schwartz and adapted by James Gardner
+ match = re.match('(\d+)(' + string.join(self.seconds + self.minutes + self.hours + self.days + self.weeks + self.months, '|') + ')$', age)