Esempio n. 1
0
            user_name = user_key.contacts_encryption.contact.user_name
            email = user_key.contacts_encryption.contact.email
    </pre>

    Copyright 2014-2016 GoodCrypto.
    Last modified: 2016-10-31

    This file is open source, licensed under GPLv3 <http://www.gnu.org/licenses/>.
'''

import os
from datetime import datetime, timedelta

# set up django early
from goodcrypto.utils import gc_django
gc_django.setup()
from django.db import IntegrityError

from goodcrypto.mail import contacts
from goodcrypto.mail.crypto_software import get_key_classname
from goodcrypto.mail.models import Contact, ContactsCrypto, EncryptionSoftware, UserKey
from goodcrypto.mail.utils import email_in_domain, gen_user_passcode
from goodcrypto.oce.crypto_factory import CryptoFactory
from goodcrypto.utils import parse_address, get_email
from goodcrypto.utils.log_file import LogFile
from syr.exception import record_exception
from syr.times import now, get_short_date_time

log = None

Esempio n. 2
0
    This file is open source, licensed under GPLv3 <http://www.gnu.org/licenses/>.
'''
import os, sys
from base64 import b64encode
from datetime import datetime, timedelta
from email.encoders import encode_base64
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from random import random
from time import sleep

# set up django early
from goodcrypto.utils import gc_django
gc_django.setup()

from django.utils.timezone import utc

from goodcrypto.constants import WARNING_WARNING_WARNING_TESTING_ONLY_DO_NOT_SHIP
from goodcrypto.mail import contacts, options
from goodcrypto.mail.constants import TAG_ERROR
from goodcrypto.mail.crypto_software import get_classname
from goodcrypto.mail.internal_settings import get_date_queue_last_active, get_domain, set_date_queue_last_active
from goodcrypto.mail.message import constants, history, utils
from goodcrypto.mail.message.crypto_message import CryptoMessage
from goodcrypto.mail.message.email_message import EmailMessage
from goodcrypto.mail.message.encrypt_utils import add_dkim_sig_optionally, create_protected_message
from goodcrypto.mail.message.inspect_utils import get_charset
from goodcrypto.mail.message.metadata import get_metadata_address, parse_bundled_message
from goodcrypto.mail.utils import send_message