How to configure email notifications in Odoo using Gmail and Microsoft 365 SMTP servers.

  • هذا الموضوع فارغ.
  • Post
    Weekend Wiki
    مدير عام
    Here’s how you can configure email notifications in Odoo using Gmail and Microsoft 365 SMTP servers.


    1. Gmail SMTP Setup

    Configuration Steps:

    1. Navigate to Odoo Email Settings:
      • Go to Settings > Technical > Email > Outgoing Mail Servers.
      • Click Create.
    2. SMTP Details for Gmail:
      • Description: Gmail SMTP
      • SMTP Server: smtp.gmail.com
      • SMTP Port: 587
      • Connection Security: STARTTLS
      • Username: Your Gmail address (e.g., [email protected]).
      • Password: Your Gmail account’s App Password.
    3. Enable App Passwords:
      • Go to Google Account Settings.
      • Enable 2-Step Verification.
      • Generate an App Password for Odoo and use it as the SMTP password.
    4. Test Email:
      • Click Test Connection to ensure the setup works.
      • If successful, Gmail is ready to send email notifications.

    2. Microsoft 365 (Outlook) SMTP Setup

    Configuration Steps:

    1. Navigate to Odoo Email Settings:
      • Go to Settings > Technical > Email > Outgoing Mail Servers.
      • Click Create.
    2. SMTP Details for Microsoft 365:
      • Description: Microsoft 365 SMTP
      • SMTP Server: smtp.office365.com
      • SMTP Port: 587
      • Connection Security: STARTTLS
      • Username: Your Microsoft 365 email address (e.g., [email protected]).
      • Password: Your Microsoft 365 account password or an App Password.
    3. Additional Microsoft 365 Configuration:
      • Ensure SMTP is enabled for the account in the Microsoft 365 Admin Center.
      • If Multi-Factor Authentication (MFA) is enabled:
        • Generate an App Password in the Microsoft 365 Security settings and use it for SMTP.
    4. Test Email:
      • Click Test Connection to verify the setup.
      • If successful, Microsoft 365 is ready to send email notifications.

    Example Email Notification

    • Use Case: Notify when a new sales order is confirmed.
    1. Go to Technical > Email > Templates.
    2. Create a new template for the Sale Order model.
    3. Define the email subject and body:
      • Subject: Sales Order Confirmation - ${object.name}
      • Body:
        Dear ${object.partner_id.name},
        
        Your sales order ${object.name} has been confirmed.
        
        Regards,
        The Odoo Team
        
    4. Link the template to automated actions if required.

    Would you like assistance with testing or setting up a specific template?

  • يجب تسجيل الدخول للرد على هذا الموضوع.
arArabic