src/client.py
def build_url(self, emails):
        """Return mailto: URL built with appropriate formatter"""
        contacts = self.wf.cached_data('contacts', max_age=0)

        if not contacts:
            raise ValueError('No contacts available')

        email_name_map = contacts['email_name_map']

        # [(name, email), ...]
        recipients = [(email_name_map.get(email), email) for
                      email in emails]

        app = self.default_app

        bundleid = None
        if isinstance(app, dict):
            bundleid = app['bundleid']
        elif isinstance(app, basestring):
            bundleid = app

        formatter = Formatter(bundleid, self.wf)
        return formatter.get_url(recipients,
                                 self.wf.settings.get('use_name', True))
Return mailto: URL built with appropriate formatter
Return mailto: URL built with appropriate formatter
Return mailto : URL built with appropriate formatter
def build_url(self, emails):
        contacts = self.wf.cached_data('contacts', max_age=0)
        if not contacts:
            raise ValueError('No contacts available')
        email_name_map = contacts['email_name_map']
        recipients = [(email_name_map.get(email), email) for
                      email in emails]
        app = self.default_app
        bundleid = None
        if isinstance(app, dict):
            bundleid = app['bundleid']
        elif isinstance(app, basestring):
            bundleid = app
        formatter = Formatter(bundleid, self.wf)
        return formatter.get_url(recipients,
                                 self.wf.settings.get('use_name', True))
def build_url ( self , emails ) : contacts = self . wf . cached_data ( 'contacts' , max_age = 0 ) if not contacts : raise ValueError ( 'No contacts available' ) email_name_map = contacts [ 'email_name_map' ] recipients = [ ( email_name_map . get ( email ) , email ) for email in emails ] app = self . default_app bundleid = None if isinstance ( app , dict ) : bundleid = app [ 'bundleid' ] elif isinstance ( app , basestring ) : bundleid = app formatter = Formatter ( bundleid , self . wf ) return formatter . get_url ( recipients , self . wf . settings . get ( 'use_name' , True ) )
Return mailto: URL built with appropriate formatter
Return mailto : URL built with appropriate formatter
"""Return mailto: URL built with appropriate formatter""" # [(name, email), ...]
self
emails