diff --git a/CHANGELOG b/CHANGELOG index e8edc6c..2440c69 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -28,7 +28,7 @@ Change Log - Remove print statements. 0.1.9 (07/19/2021) -------------------- +------------------ - Allow users to add multiple recipients while sending email. - Add CC and BCC options. - Check if attachment file is available before trying to attach. @@ -37,15 +37,19 @@ Change Log - Fix version number format. 0.2.0 (07/22/2021) -------------------- +------------------ - Return a dictionary element after sending an email/SMS. - Add status code and description to return dict. - Update docs and CHANGELOG - Bump version. 0.2.1 (07/24/2021) -------------------- +------------------ - Remove logger module. - Add exception handlers for Messenger class. - Update docs and CHANGELOG -- Bump version. \ No newline at end of file +- Bump version. + +0.2.2 (08/02/2021) +------------------ +- Fix incorrect HTTP return codes \ No newline at end of file diff --git a/gmailconnector/read_email.py b/gmailconnector/read_email.py index 8f31334..0d4d651 100644 --- a/gmailconnector/read_email.py +++ b/gmailconnector/read_email.py @@ -60,7 +60,7 @@ def read_email(self) -> dict or None: '\t3. If you have enabled 2 factor authentication, use thee App Password generated.' return { 'ok': False, - 'status': 200, + 'status': 401, 'body': return_msg } diff --git a/gmailconnector/send_email.py b/gmailconnector/send_email.py index 10c19bb..629a3cb 100644 --- a/gmailconnector/send_email.py +++ b/gmailconnector/send_email.py @@ -89,7 +89,7 @@ def send_email(self) -> dict: "Ensure the credentials stored in env vars are set correct.\n" return { 'ok': False, - 'status': 403, + 'status': 401, 'body': return_msg } except SMTPConnectError: diff --git a/gmailconnector/send_sms.py b/gmailconnector/send_sms.py index 5d80c06..bdce3e8 100644 --- a/gmailconnector/send_sms.py +++ b/gmailconnector/send_sms.py @@ -61,7 +61,7 @@ def send_sms(self) -> dict: "Ensure the credentials stored in env vars are set correct.\n" return { 'ok': False, - 'status': 403, + 'status': 401, 'body': return_msg } except SMTPConnectError: diff --git a/version.py b/version.py index 655a17c..9d3b095 100644 --- a/version.py +++ b/version.py @@ -1 +1 @@ -version_info = (0, 2, 1) +version_info = (0, 2, 2)