• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 19. Events and Subscribers > Step 1: Developing the Mail Subscription I...

Step 1: Developing the Mail Subscription Interface

You need to have an interface for managing the subscriptions for a particular message (that is, adding, deleting, and getting email addresses). Therefore, you need to add the following interface to the interfaces module:

01 class IMailSubscriptions(Interface):
02     """This interface allows you to retrieve a list of E-mails for
03     mailings. In our context these are messages."""
04 
05     def getSubscriptions():
06         """Return a list of E-mails."""
07 
08     def addSubscriptions(emails):
09         """Add a bunch of subscriptions; one would be okay too."""
10 
11     def removeSubscriptions(emails):
12         """Remove a set of subscriptions."""


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint