Alpaca-ROC-Trading-Bot
Alpaca-ROC-Trading-Bot copied to clipboard
Google Oauth2.0 integration
This PR updates the email alert system used in main.py
. #15
Previously, an outdated mail_alert
function was in place. This function has been commented out in favor of a more streamlined and efficient implementation. The new system utilizes two new functions, create_message
and send_message
, that have been defined in the mail
module.
Key changes include:
-
Replacement of old
mail_alert
function: Themail_alert
function was commented out and replaced with thecreate_message
andsend_message
functions. This refactoring simplifies the process of creating and sending email alerts. -
Improved error handling: The new system uses Google's
HttpError
for more robust error handling during the message creation and sending process. -
Streamlined function usage: The
alert_user
function has been introduced, which internally usescreate_message
andsend_message
to send email alerts. This allows for cleaner function calls in the main code.
Please review the changes and let me know if there are any issues or suggestions. This update aims to improve the maintainability and efficiency of the email alert system in main.py
.