V0.6 #852

Merged
Atheros1 merged 399 commits from v0.6 into master 2016-05-03 01:58:38 +02:00
Showing only changes of commit bdfaa90ecb - Show all commits

View File

@ -52,7 +52,9 @@ import pickle
import platform import platform
import textwrap import textwrap
import debug import debug
import random
import subprocess import subprocess
import string
import datetime import datetime
from helper_sql import * from helper_sql import *
import l10n import l10n
@ -2185,12 +2187,24 @@ class MyForm(settingsmixin.SMainWindow):
toAddressesList)) # remove duplicate addresses. If the user has one address with a BM- and the same address without the BM-, this will not catch it. They'll send the message to the person twice. toAddressesList)) # remove duplicate addresses. If the user has one address with a BM- and the same address without the BM-, this will not catch it. They'll send the message to the person twice.
for toAddress in toAddressesList: for toAddress in toAddressesList:
if toAddress != '': if toAddress != '':
if toAddress.find("@") >= 0 and isinstance(acct, GatewayAccount): if toAddress.find("@") >= 0:
if isinstance(acct, GatewayAccount):
acct.createMessage(toAddress, fromAddress, subject, message) acct.createMessage(toAddress, fromAddress, subject, message)
subject = acct.subject subject = acct.subject
toAddress = acct.toAddress toAddress = acct.toAddress
logger.debug("Subject: %s" % (subject)) else:
logger.debug("address: %s" % (toAddress)) email = acct.getLabel()
if email[-14:] != "@mailchuck.com": #attempt register
# 12 character random email address
email = ''.join(random.SystemRandom().choice(string.ascii_lowercase) for _ in range(12)) + "@mailchuck.com"
acct = MailchuckAccount(fromAddress)
acct.register(email)
shared.config.set(fromAddress, 'label', email)
shared.config.set(fromAddress, 'gateway', 'mailchuck')
shared.writeKeysFile()
self.statusBar().showMessage(_translate(
"MainWindow", "Error: Your account wasn't registered at an email gateway. Sending registration now as %1, please wait for the registration to be processed before retrying sending.").arg(email))
return
status, addressVersionNumber, streamNumber, ripe = decodeAddress( status, addressVersionNumber, streamNumber, ripe = decodeAddress(
toAddress) toAddress)
if status != 'success': if status != 'success':