5 |
5 |
6 """ |
6 """ |
7 Module implementing a dialog to send bug reports. |
7 Module implementing a dialog to send bug reports. |
8 """ |
8 """ |
9 |
9 |
|
10 import base64 |
10 import os |
11 import os |
11 import base64 |
|
12 |
12 |
|
13 from google.auth.exceptions import RefreshError |
|
14 from google.auth.transport.requests import Request |
|
15 from google.oauth2.credentials import Credentials, UserAccessTokenCredentials |
|
16 from google_auth_oauthlib.flow import InstalledAppFlow |
13 from googleapiclient import discovery, errors |
17 from googleapiclient import discovery, errors |
14 from google.oauth2.credentials import Credentials, UserAccessTokenCredentials |
18 from PyQt6.QtCore import QObject, pyqtSignal |
15 from google.auth.transport.requests import Request |
|
16 from google.auth.exceptions import RefreshError |
|
17 from google_auth_oauthlib.flow import InstalledAppFlow |
|
18 |
|
19 |
|
20 from PyQt6.QtCore import pyqtSignal, QObject |
|
21 |
19 |
22 from eric7 import Globals |
20 from eric7 import Globals |
23 |
21 |
24 from .EricGoogleMailHelpers import ( |
22 from .EricGoogleMailHelpers import CLIENT_SECRET_FILE, SCOPES, TOKEN_FILE |
25 CLIENT_SECRET_FILE, |
|
26 SCOPES, |
|
27 TOKEN_FILE, |
|
28 ) |
|
29 |
23 |
30 |
24 |
31 class EricGoogleMail(QObject): |
25 class EricGoogleMail(QObject): |
32 """ |
26 """ |
33 Class implementing the logic to send emails via Google Mail. |
27 Class implementing the logic to send emails via Google Mail. |