root / trunk / turbomail / __init__.py

Revision 109, 502 bytes (checked in by fs, 2 months ago)

Most compatibility stuff for #72 done

Line 
1
2
3import warnings
4
5from turbomail.control import interface
6from turbomail.exceptions import *
7from turbomail.message import Message
8
9__all__ = ['send', 'enqueue', 'Message']
10
11
12def send(message):
13    '''Send a message via TurboMail.'''
14    return interface.send(message)
15
16
17def enqueue(message):
18    # Just for compatibility with TurboMail 2.x
19    text = '"enqueue(message)" is deprecated, please use send(message) instead.'
20    warnings.warn(text, category=DeprecationWarning)
21    return send(message)
Note: See TracBrowser for help on using the browser.