165 @pyqtSlot() |
165 @pyqtSlot() |
166 def on_sendButton_clicked(self): |
166 def on_sendButton_clicked(self): |
167 """ |
167 """ |
168 Private slot to send the email message. |
168 Private slot to send the email message. |
169 """ |
169 """ |
170 if self.attachments.topLevelItemCount(): |
170 msg = ( |
171 msg = self.__createMultipartMail() |
171 self.__createMultipartMail() |
172 else: |
172 if self.attachments.topLevelItemCount() else |
173 msg = self.__createSimpleMail() |
173 self.__createSimpleMail() |
|
174 ) |
174 |
175 |
175 if Preferences.getUser("UseGoogleMailOAuth2"): |
176 if Preferences.getUser("UseGoogleMailOAuth2"): |
176 self.__sendmailGoogle(msg) |
177 self.__sendmailGoogle(msg) |
177 else: |
178 else: |
178 ok = self.__sendmail(msg.as_string()) |
179 ok = self.__sendmail(msg.as_string()) |