Exemplo n.º 1
0
 def __init__(self, email, password, username, domain, labels, num_threads=60, prefix=''):
     print 'email:', email, 'username:'******'domain:', domain, 'labels:', labels
     self.username = username
     self.domain = domain
     self.labels = labels
     self.prefix = prefix
     self.service = service.MigrationService(
         email=email,
         password=password,
         domain=domain,
         source='org.mrph.ivan.maildir2gmail.v1')
     self.service.ProgrammaticLogin()
     self.thread_pool = aij_threading.ThreadPool(num_threads)
     self.failures = []
Exemplo n.º 2
0
    def __init__(self, domain, email, password):
        """Constructor for the EmailMigrationSample object.

    Construct an EmailMigrationSample with the given args.

    Args:
      domain: The domain name ("domain.com")
      email: The email account of the user or the admin ("*****@*****.**")
      password: The domain admin's password
    """
        self.service = service.MigrationService(
            email=email,
            password=password,
            domain=domain,
            source='googlecode-migrationsample-v1')
        self.service.ProgrammaticLogin()
        # Sample mail properties
        self.mail_item_properties = ['IS_INBOX', 'IS_UNREAD']
        self.mail_labels = ['EmailMigrationSample']