diff --git a/addons/dine360_reservation/controllers/main.py b/addons/dine360_reservation/controllers/main.py index 9527110..b43474a 100644 --- a/addons/dine360_reservation/controllers/main.py +++ b/addons/dine360_reservation/controllers/main.py @@ -271,50 +271,61 @@ class TableReservationController(http.Controller): # Send Emails try: - company_email = request.env.company.email or 'info@chennora.ca' + import logging + _logger = logging.getLogger(__name__) + + # Use the configured outgoing mail server's FROM address (must match SMTP username) + outgoing_server = request.env['ir.mail_server'].sudo().search([], limit=1) + smtp_from = outgoing_server.smtp_user if outgoing_server else 'alaguraj0361@gmail.com' - # 1. Notify the Company + # 1. Notify the Company (Admin) admin_mail_values = { 'subject': f"New Table Reservation: {customer_name}", 'body_html': f""" -
A new table reservation has been submitted successfully.
-A new table reservation has been submitted from the website.
+| Customer Name: | {customer_name} |
| Phone: | {phone} |
| Email: | {email} |
| Number of Guests: | {num_people} |
| Reservation Time: | {start_time_str} |
Dear {customer_name},
-Your table reservation has been confirmed successfully!
-Reservation Details:
-If you have any questions or need to make changes, please reply to this email.
-We look forward to seeing you!
-Thank you,
Chennora
Dear {customer_name},
+Your table reservation at Chennora Indian Kitchen Bar has been confirmed successfully!
+| Number of Guests: | {num_people} |
| Reservation Time: | {start_time_str} |
If you need to make any changes or have questions, please reply to this email or call us at +1(647)856-2878.
+We look forward to seeing you!
+Thank you,
Chennora Indian Kitchen Bar