mirror of
https://github.com/NaN-tic/trytond-electronic_mail-old.git
synced 2023-12-14 02:22:55 +01:00
Not send email if not have recipients
This commit is contained in:
parent
b97bae7e66
commit
28e7d6a0d1
|
@ -453,6 +453,10 @@ class ElectronicMail(ModelSQL, ModelView):
|
|||
email_configuration = EmailConfiguration(1)
|
||||
|
||||
recipients = self.recipients_from_fields()
|
||||
if not recipients:
|
||||
self.mailbox = email_configuration.draft
|
||||
self.save()
|
||||
return False
|
||||
|
||||
if self.mailbox.smtp_server:
|
||||
server = self.mailbox.smtp_server
|
||||
|
|
Loading…
Reference in a new issue