Alpaca-ROC-Trading-Bot icon indicating copy to clipboard operation
Alpaca-ROC-Trading-Bot copied to clipboard

Google Oauth2.0 integration

Open ManindraDeMel opened this issue 1 year ago • 0 comments

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:

  1. Replacement of old mail_alert function: The mail_alert function was commented out and replaced with the create_message and send_message functions. This refactoring simplifies the process of creating and sending email alerts.

  2. Improved error handling: The new system uses Google's HttpError for more robust error handling during the message creation and sending process.

  3. Streamlined function usage: The alert_user function has been introduced, which internally uses create_message and send_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.

ManindraDeMel avatar Jun 03 '23 08:06 ManindraDeMel