New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

cf-send-email-worker

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cf-send-email-worker

[English](README.md) / [中文版](README-CN.md)

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

English / 中文版

Free Sending Email Api Service

A private api service for sending email powered by Cloudflare worker project.

Prepare Job

  • Prepare a domian, such as formtome.com. Now, add a website in cloudflare-dashboard and build your domain. It maybe cost you about 30min.
  • Select your site and domain, Enable Email Routing. It maybe cost you about 5min.
  • Install warngler for delpoy cf worker. Ensure your node version >= 16.13.0 and run :
npm install wrangler@latest -g

Setup

  • Get the code
git clone git@github.com:maojindao55/cf-send-email-worker.git
  • Custom wrangler.toml
name = "send-email-api" 
main = "./index.js" 
compatibility_date = "2022-05-03"
[[send_email]]
type = "send_email"
name = "SEB"
allowed_destination_addresses = ["your-dest@example.com"] 
# Here, replace your verified email address.
  • Deploy your worker
wrangler deploy  --name send-email-worker-api

API Documentation

Endpoint

http://{{your-cf-worker-prefix}}.workers.dev/

Method

POST

Parameters

NameTypeDescription
sender_emailstringThe email address of the sender.
sender_namestringThe name of the sender.
recipient_emailstringThe email address of the recipient.
subjectstringThe subject of the email.
msg_datastringThe message body of the email.

Example Request

curl -d"sender_email=admin@yourdomain.com&sender_name=FromWorker&recipient_email=your-dest@example.com&subject='Hello Guy!'&msg_data='My first email sent!'" "http://send-email-worker-api.workers.dev/"

FAQs

Package last updated on 11 Mar 2024

Related posts