intrgrating suggestions after betta 1
This commit is contained in:
@@ -82,9 +82,9 @@ def send_gmail(to_email, subject, body):
|
||||
def send_gmail_with_attachment(to_email, subject, body, attachment_path):
|
||||
smtp_host = "smtp.gmail.com"
|
||||
smtp_port = 587
|
||||
smtp_user = os.environ.get("GMAIL_USER")
|
||||
smtp_pass = os.environ.get("GMAIL_PASS")
|
||||
sender_email = smtp_user
|
||||
smtp_user = 'macamete.robert@gmail.com'
|
||||
smtp_pass = 'advx yqlv jkaa czvr'
|
||||
sender_email = 'macamete.robert@gmail.com'
|
||||
|
||||
if not all([smtp_user, smtp_pass]):
|
||||
raise ValueError("GMAIL_USER and GMAIL_PASS must be set in environment variables.")
|
||||
|
||||
31
transportmanager/server/utils/welcome_email.py
Normal file
31
transportmanager/server/utils/welcome_email.py
Normal file
@@ -0,0 +1,31 @@
|
||||
import os
|
||||
from utils.email import send_gmail_with_attachment
|
||||
|
||||
class WelcomeMessage:
|
||||
def __init__(self, name, email):
|
||||
self.name = name
|
||||
self.email = email
|
||||
self.subject = 'Welcome to Order Go - TMS - Your Account is Ready'
|
||||
self.assets_folder = os.path.abspath(
|
||||
os.path.join(os.path.dirname(__file__), "..", "assets")
|
||||
)
|
||||
self.manual = os.path.join(self.assets_folder, "manual.pdf")
|
||||
self.body = f'''
|
||||
|
||||
Dear {self.name},
|
||||
|
||||
We are pleased to welcome you to Order Go - TMS. Thank you for choosing our platform to support your business needs.
|
||||
|
||||
To assist you in getting started, we have attached the User Manual to this email. It provides step-by-step instructions on account setup, feature overview, and best practices for using Order Go - TMS efficiently.
|
||||
|
||||
We recommend reviewing the manual at your convenience to become familiar with the system's capabilities. Should you require any further assistance, our support team is available at support@ordergotms.com.
|
||||
|
||||
We look forward to supporting your success and building a long-term partnership.
|
||||
|
||||
Sincerely,
|
||||
The Order Go - TMS Team
|
||||
|
||||
'''
|
||||
|
||||
def send_email(self):
|
||||
send_gmail_with_attachment(to_email=self.email, subject=self.subject, body=self.body, attachment_path=self.manual)
|
||||
Reference in New Issue
Block a user