eric6/UI/EmailDialog.py

changeset 8260
2161475d9639
parent 8240
93b8a353c4bf
--- a/eric6/UI/EmailDialog.py	Wed Apr 21 19:40:50 2021 +0200
+++ b/eric6/UI/EmailDialog.py	Thu Apr 22 18:02:47 2021 +0200
@@ -167,10 +167,11 @@
         """
         Private slot to send the email message.
         """
-        if self.attachments.topLevelItemCount():
-            msg = self.__createMultipartMail()
-        else:
-            msg = self.__createSimpleMail()
+        msg = (
+            self.__createMultipartMail()
+            if self.attachments.topLevelItemCount() else
+            self.__createSimpleMail()
+        )
         
         if Preferences.getUser("UseGoogleMailOAuth2"):
             self.__sendmailGoogle(msg)

eric ide

mercurial