Custom Form & SMTP Mailer by Tiwaa

Setup guide

Connect a mail account you own, then point Shopify Flow, your forms, or anything else at it.

Step 1 · Connect a mail account

Any of these works. Pick the one that matches where your email already lives.

Any SMTP server
Start here. Your mail already lives somewhere — Gmail, your host, Zoho, Outlook.
Needs a host, port, username and password. If the account has two-factor authentication you must use an app password rather than your login password; every provider below explains where to create one.
A provider API key
High volume, or you already pay SendGrid / Mailgun / Brevo / Postmark / Resend / SES.
Usually the most reliable at scale and gives the clearest failure messages. Requires verifying your sending domain with that provider.

Option A · Any SMTP server

Set Mailer to “Other SMTP”, then fill in the host, port, encryption, username and password. Only ports 587 and 465 work — port 25 is blocked outbound, as it is on every major cloud platform.

Gmail / Google Workspace (app password)smtp.gmail.com587 · STARTTLS
  1. 1Turn on 2-Step Verification at myaccount.google.com/security — app passwords do not exist without it.
  2. 2Go to myaccount.google.com/apppasswords and create one. Name it anything.
  3. 3Google shows a 16-character password. Paste it into SMTP password here, removing the spaces.
  4. 4Username is your full Gmail address.
An app password is a separate, revocable credential — it is not your Google account password, and deleting it later does not affect anything else in your account.
Outlook.com / Microsoft 365smtp-mail.outlook.com587 · STARTTLS
  1. 1Username is your full email address.
  2. 2If your account has two-factor authentication, create an app password under Microsoft account → Security → Advanced security options.
  3. 3On a business tenant, an administrator may need to enable SMTP AUTH for the mailbox — it is off by default on Microsoft 365.
Microsoft 365 business mailboxes use smtp.office365.com.
Zoho Mailsmtp.zoho.com465 · TLS
  1. 1Username is your full Zoho address.
  2. 2With two-factor authentication on, create an app-specific password in Zoho Accounts → Security → App Passwords.
  3. 3Regional accounts use a different host: smtp.zoho.eu, smtp.zoho.in, smtp.zoho.com.au.
Zoho requires the From address to be the same mailbox you authenticate as.
cPanel / shared hostingmail.yourdomain.com587 · STARTTLS
  1. 1In cPanel open Email Accounts → the address → Connect Devices. The exact hostname and port are listed there.
  2. 2Username is the full email address; the password is the mailbox password.
  3. 3If 587 is refused, try 465 with TLS — many hosts offer only one.
Shared hosting often has a low hourly send limit. Check with your host before relying on it for volume.
Amazon SES (SMTP mode)email-smtp.<region>.amazonaws.com587 · STARTTLS
  1. 1In the SES console open SMTP settings → Create SMTP credentials. These are NOT your AWS access keys.
  2. 2Use the generated SMTP username and password here.
  3. 3Your account must be out of the SES sandbox to email addresses you have not verified.
The Amazon SES option under Mailer uses the SES API instead and is simpler — it takes your normal AWS access keys.

Option B · A provider API key

Pick the provider under Mailer and paste its key. Every one of these needs your sending domain verified with that provider first — without it, your mail is rejected or filtered regardless of what this app does.

SendGrid
  1. 1Verify your sending domain under Settings → Sender Authentication.
  2. 2Settings → API Keys → Create API Key. Restricted Access is enough, with Mail Send set to Full Access.
  3. 3Paste the key here. It is shown only once by SendGrid.
Mailgun
  1. 1Add and verify your domain under Send → Domains.
  2. 2Domain settings → Sending API keys → create one.
  3. 3Enter both the key and the sending domain here, and pick US or EU to match where your domain was created.
Brevo (Sendinblue)
  1. 1Authenticate your domain under Senders, Domains & Dedicated IPs.
  2. 2SMTP & API → API Keys → Generate a new API key.
  3. 3Paste it here. Your From address must be a verified sender in Brevo.
Postmark
  1. 1Add and verify your Sender Signature or domain.
  2. 2Open the server you want to send from → API Tokens → copy the Server API token.
  3. 3Use the server token, not the account token — the account token cannot send mail.
Resend
  1. 1Add your domain under Domains and add the DNS records it gives you.
  2. 2API Keys → Create API Key with sending permission.
  3. 3Paste it here and set a From address on that domain.
Amazon SES (API)
  1. 1Verify your domain or address in the SES console, in the region you intend to use.
  2. 2Create an IAM user with the ses:SendEmail permission and generate an access key.
  3. 3Enter the access key ID, secret access key and region here.
  4. 4Request production access if your account is still in the SES sandbox.

Step 2 · Send from Shopify Flow

The app adds a Send email (SMTP) action to Shopify Flow, so any app with a Flow trigger can send mail through your server. Unlike Flow’s built-in email action, the recipient can be a variable — so you can write to the customer who triggered the workflow, not only to your own team.

1
Finish Mail settings first
The Flow action refuses to save until this app can actually send, so connect a mailer and run a test email before building the workflow.
2
Create a workflow
Shopify admin → Flow → Create workflow. Any trigger works: an order, a customer, an abandoned checkout, or a trigger from another app such as Smart Form Builder's “Form submitted”.
3
Add the action
Click + and choose “Send email (SMTP)” under Custom Form & SMTP Mailer.
4
Fill in the fields
To, Subject and Message are required. Every field takes variables — click “Add variable” to insert one. This is what Flow's built-in email action cannot do: you can put a customer's address in the To field.
5
Turn it on
Save and enable the workflow. Each run appears in the Delivery log with its result, so a failure is never silent.

Step 3 · Connect a form, script or another app

Create a key under API keys, then POST JSON to the endpoint below. This is how a third-party form, a landing page outside Shopify, or a server script sends through your domain.

POST https://custom-form-smtp-mailer.pages.dev/api/send
Body
tostring | string[]requiredRecipient(s). A comma-separated string also works.
subjectstringrequiredSubject line. Supports {{variable}} placeholders.
htmlstringone ofHTML body. Supports {{variable}} placeholders.
textstringone ofPlain-text body. Generated from the HTML when omitted.
fieldsobjectone ofRaw form fields. With no html or text, the body is rendered as a table from these.
variablesobjectoptionalValues merged into {{name}} placeholders in the subject and body.
cc / bccstring | string[]optionalAdditional recipients. 50 total across to, cc and bcc.
replyTostringoptionalOverrides the default reply-to for this message.
fromNamestringoptionalOverrides the sender display name for this message.
sourcestringoptionalLabel shown in the delivery log, e.g. “contact-form”.
A form you do not control

Post the fields and skip the template entirely — the email body is built from them.

fetch("https://custom-form-smtp-mailer.pages.dev/api/send", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    to: "orders@yourstore.com",
    subject: "New enquiry from {{name}}",
    variables: { name: form.name },
    fields: {
      Name: form.name,
      Email: form.email,
      Message: form.message
    },
    replyTo: form.email,
    source: "contact-form"
  })
});
Keep keys server-side where you can. A key in storefront JavaScript is readable by anyone who views the page. Sends are capped at 60 a minute per store to limit the damage, and you can revoke any key without touching the others.

When a send fails

Open the Delivery log first — it shows your mail server’s own words, not a generic error. These are the ones that come up most.

535 Authentication failed
The password is wrong, or the account has two-factor authentication and needs an app password rather than the login password.
Fix: Create an app password in that account’s security settings and use it here. For Gmail, turn on 2-Step Verification first, then visit myaccount.google.com/apppasswords.
Sender address rejected / not allowed
The From address is not one your provider or mail server is permitted to send as.
Fix: Use an address on a domain you have verified with the provider. On Gmail and Zoho it must be the mailbox you authenticated as.
Port 25 is blocked
Outbound port 25 is blocked on the platform this app runs on, as on every major cloud, to prevent spam relays.
Fix: Use 587 with STARTTLS, or 465 with TLS.
The mail server does not offer STARTTLS on this port
You chose STARTTLS but the port only speaks implicit TLS.
Fix: Switch to port 465 and set Encryption to TLS.
Rate limit exceeded
More than 60 API sends in a minute from this store.
Fix: Spread the sends out. If a key leaked, revoke it under API keys.

FAQ

Does my mail come from Tiwaa?
No. Every message is delivered by your own mail server or provider account, from your own From address. Credentials are held encrypted and the message is passed through — nothing is sent from our infrastructure, so your domain's sending reputation is entirely yours.
Is there a sending limit?
Not from us — we do not meter your email, and the $2 plan does not cap it. Your own provider's limits apply. The send API is rate limited to 60 messages a minute per store to blunt a leaked key.
Can I use this with Smart Form Builder?
Yes, two ways. Either create an API key here and paste it into Smart Form Builder under Settings → Email, which routes its notifications and autoresponders through your server; or use its “Form submitted” Flow trigger with this app's “Send email (SMTP)” action.
Is my password safe?
It is encrypted with AES-GCM before being stored and decrypted only at the moment a message is sent. It is never sent back to your browser — the settings page shows only whether a password is saved.
What does the app read from my store?
Nothing. It requests no Admin API scopes at all. Shopify Flow passes everything the action needs in its own request.
Will my email land in spam?
That depends on your sending domain, not on this app. Make sure SPF, DKIM and DMARC are set up for the domain in your From address — every provider above documents the exact records. Sending as an address on a domain you have not authenticated is the most common cause.