تخطَّ إلى المحتوى

Email

يسمح مزود مراسلة Email للعامل الرقمي بالتواصل عبر البريد الإلكتروني. يستخدم إعداد العرض الحالي بيانات اعتماد Microsoft Graph للبريد الصادر، بينما يعالج البريد الوارد عادة عبر مزود أحداث أو webhook لمزود البريد. يدعم:

  • إرسال البريد الإلكتروني
  • استقبال البريد الإلكتروني (عبر webhooks)
  • تنسيق HTML
  • المرفقات

messaging-email هو مزود SMTP صادر. لا يستطلع صناديق بريد IMAP أو POP3. عادة يعالج البريد الوارد عبر مزود أحداث أو webhook مزود، مثل SendGrid Inbound Parse أو Mailgun Routes أو AWS SES أو Microsoft Graph subscriptions عندما يدعمها pack المثبت.

  1. اضبط إعدادات البريد الإلكتروني

    answers.json
    {
    "messaging-email": {
    "enabled": true,
    "from_address": "support@example.com",
    "graph_tenant_id": "your-tenant-id",
    "ms_graph_client_id": "your-client-id",
    "ms_graph_client_secret": "your-client-secret",
    "ms_graph_refresh_token": "your-refresh-token"
    }
    }
  2. Configure Inbound (Optional)

    For receiving emails, set up an event source or webhook with your email provider:

    • SendGrid Inbound Parse
    • Mailgun Routes
    • AWS SES
  3. Run Setup

    Terminal window
    gtc setup --answers answers.json ./my-bundle
OptionRequiredDescription
enabledYesEnable/disable provider
from_addressYesDefault from address
graph_tenant_idFor Microsoft GraphMicrosoft tenant ID
ms_graph_client_idFor Microsoft GraphMicrosoft Graph app/client ID
ms_graph_client_secretFor Microsoft GraphMicrosoft Graph client secret
ms_graph_refresh_tokenFor Microsoft GraphRefresh token used by the pack
- id: send_email
type: reply
config:
to: "{{user_email}}"
subject: "Your Support Request"
message: "Thank you for contacting us. We'll get back to you shortly."
- id: send_html_email
type: reply
config:
to: "{{user_email}}"
subject: "Welcome!"
html: |
<html>
<body>
<h1>Welcome to Our Service!</h1>
<p>Thank you for signing up.</p>
<a href="https://example.com/start">Get Started</a>
</body>
</html>
- id: send_with_attachment
type: reply
config:
to: "{{user_email}}"
subject: "Your Report"
message: "Please find your report attached."
attachments:
- url: "https://example.com/report.pdf"
filename: "report.pdf"
- id: send_copy
type: reply
config:
to: "{{user_email}}"
cc: "manager@example.com"
bcc: "archive@example.com"
subject: "Support Update"
message: "Your ticket has been resolved."
flows/on_email.ygtc
name: handle_email
version: "1.0"
nodes:
- id: process
type: reply
config:
to: "{{from_address}}"
subject: "Re: {{subject}}"
message: "Thank you for your email. We've received your message."
triggers:
- type: email
target: process