Send Mail via MailTrigger ========================= To send emails directly using MailTrigger (without a third-party SMTP), follow the steps below and ensure correct DNS setup. A. Verify and Configure Domain ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1. Go to **Domains**, select your domain, and ensure it shows **Verified** (TXT DNS token correctly added). 2. Add the following records in your DNS provider: - **SPF**: Add ``a:smtp.mailtrigger.app`` to your SPF record. - **DKIM**: Enable DKIM in the MailTrigger domain settings and copy the generated TXT record into your DNS. - **(Optional) DMARC**: It is recommended to add: :: v=DMARC1; p=none; rua=mailto:{your-email} After confirming everything works, you may change ``p=none`` to ``quarantine`` or ``reject``. B. Create RelaySMTP Action ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1. Navigate to **Actions** → **Add Action**. 2. **Name**: ``RelaySMTP`` (or any descriptive name). 3. **Action Type**: Select **Relay Action**. 4. **Parameters**: - ``timeout``: ``30`` (default; adjust if needed) 5. Click **Save**, and test the Action using **Test** to confirm everything works. C. Create a Route to Use RelaySMTP ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1. Go to **Routes** → **Add Route**. 2. **Mailbox**: Select the mailbox to send from (e.g., ``Bob@example.com``). 3. **Name**: ``Route_SendViaMailTrigger`` 4. **Filter Option**: Choose **All** (must match all conditions). 5. **Select Rules**: - Add a Rule: - **Target**: ``Sender`` - **Rule Type**: ``Equals`` - **Value**: ``Bob@example.com`` 6. **Pass to Next Route**: Check **True** (allows subsequent routes to execute). 7. **Execution Mechanism**: Select **Sequential**. 8. **Actions**: Drag in the ``RelaySMTP`` action created earlier. 9. **Enabled**: Check the box. 10. Click **Save**, then go to **Test** → **Manual Input** to simulate: - **Sender**: ``Bob@example.com`` - **Receiver**: any test email address you control - **Subject/Body**: any content - Click **Run Test** and verify success via **Route Logs** and recipient inbox. .. note:: - If your domain has no actual mailbox on another provider and no MX record pointing to MailTrigger, you *can still send* via this route, but you *won’t be able to receive replies*. - To receive replies, set up an MX record pointing to ``smtp.mailtrigger.app`` and create a forwarding Route to an external mailbox. .. _gmail-smtp-setup: Gmail SMTP Setup Guide ====================== Here’s how to set up Gmail to use MailTrigger’s RelaySMTP Action as an external SMTP provider: 1. Log in to Gmail, click the gear icon → **See all settings**. 2. Go to the **Accounts and Import** tab. 3. Under **Send mail as**, click **Add another email address**. 4. In the popup: - **Name**: Display name shown to recipients. - **Email Address**: Your MailTrigger mailbox (e.g., ``Bob@example.com``). - Check **Treat as an alias** if desired, then click **Next Step**. 5. SMTP settings: - **SMTP Server**: ``smtp.mailtrigger.app`` - **Username**: ``Bob@example.com`` - **Password**: Your mailbox password - **Port**: ``587`` - **Secure Connection**: **TLS** Click **Add Account**. 6. Gmail will send a verification email to ``Bob@example.com``. - Log in to MailTrigger UI, go to **Route Logs** to find the incoming message and extract the verification code. - Or, if you’ve set up forwarding, check your forwarding email inbox. - Enter the code in Gmail to complete the setup. 7. Once verified, you can select ``Bob@example.com`` in the **From** dropdown when composing a new email in Gmail. Gmail will then send via MailTrigger’s RelaySMTP server.