blog.post.otherLanguageHintblog.notFound.switchToChinese
Note: This article has an English versionSwitch to Chinese
A private api/worker service for sending email powered by Cloudflare worker project.
A private api/worker service for sending email powered by Cloudflare worker project.
example.com. Now, add a website in cloudflare-dashboard and build your domain. It maybe cost you about 30min.shnpm install wrangler@latest -g
shgit clone git@github.com:willin/cloudflare-send-email-service.git
shwrangler deploy --name send-email-worker-service
Add a TXT record to your domain with the following values:
yourdomain.comv=spf1 a mx include:relay.mailchannels.net ~allNote: If you're facing Domain Lockdown error, follow the below steps:
_mailchannels.yourdomain.comv=mc1 cfid=yourdomain.workers.dev (the value of cfid will also be present in the error response)This step is optional, but highly recommended. DKIM is a DNS record that helps prevent email spoofing. You may follow the steps listed in the MailChannels documentation to set up DKIM for your domain.
http://{{your-cf-worker-prefix}}.workers.dev/
POST
| Name | Type | Description |
|---|---|---|
sender_email | string | The email address of the sender. |
sender_name | string | The name of the sender. |
recipient_email | string | The email address of the recipient. |
subject | string | The subject of the email. |
message | string | The message body of the email. |
shcurl -d"sender_email=admin@yourdomain.com&sender_name=Demo&recipient_email=your-dest@example.com&subject='Hello Guy!'&msg_data='My first email sent!'" "http://your-cf-worker-prefix.workers.dev/"