summaryrefslogtreecommitdiff
path: root/service/pixelated/adapter/services
diff options
context:
space:
mode:
Diffstat (limited to 'service/pixelated/adapter/services')
-rw-r--r--service/pixelated/adapter/services/mail_sender.py4
-rw-r--r--service/pixelated/adapter/services/mail_service.py6
2 files changed, 6 insertions, 4 deletions
diff --git a/service/pixelated/adapter/services/mail_sender.py b/service/pixelated/adapter/services/mail_sender.py
index 50c17ba5..1c2d7ce1 100644
--- a/service/pixelated/adapter/services/mail_sender.py
+++ b/service/pixelated/adapter/services/mail_sender.py
@@ -35,4 +35,6 @@ class MailSender():
file=StringIO(mail.to_smtp_format()),
deferred=resultDeferred)
- return reactor.connectTCP('localhost', 4650, senderFactory)
+ reactor.connectTCP('localhost', 4650, senderFactory)
+
+ return resultDeferred
diff --git a/service/pixelated/adapter/services/mail_service.py b/service/pixelated/adapter/services/mail_service.py
index 3b70890b..7bf76676 100644
--- a/service/pixelated/adapter/services/mail_service.py
+++ b/service/pixelated/adapter/services/mail_service.py
@@ -13,8 +13,6 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
-
-
class MailService:
__slots__ = ['leap_session', 'account', 'mailbox_name']
@@ -44,8 +42,10 @@ class MailService:
def mail_exists(self, mail_id):
return not(not(self.querier.get_header_by_chash(mail_id)))
- def send(self, last_draft_ident, mail):
+ def send(self, mail):
self.mail_sender.sendmail(mail)
+
+ def move_to_send(self, last_draft_ident, mail):
if last_draft_ident:
self.mailboxes.drafts().remove(last_draft_ident)
return self.mailboxes.sent().add(mail)