Skip to content

Mailer for the contact form on mainmatter.com – Cloudflare worker written in Rust

Notifications You must be signed in to change notification settings

mainmatter/mainmatter-website-mailer

Repository files navigation

Mainmatter Website Mailer

This is a simple email sending service used to deliver mails sent via the contact form on mainmatter.com. It's written in Rust using workers-rs and runs as a worker on Cloudflare's edge infrastructure.

Usage

The project is based on the template for worker-rs. The main code is in the src/lib.rs file.

The wrangler package is used to run the worker locally:

$ pnpm run dev

as well as to deploy a new version:

$ pnpm run deploy

Development

Development works like with any other Rust crate, just tests must be run via wasm-pack as they run in a browser:

wasm-pack test --headless --chrome

WebAssembly

workers-rs (the Rust SDK for Cloudflare Workers used in this template) is meant to be executed as compiled WebAssembly, and as such so must all the code you write and depend upon. All crates and modules used in Rust-based Workers projects have to compile to the wasm32-unknown-unknown triple.

Read more about this on the workers-rs project README.

Copyright

Copyright © 2022 Mainmatter GmbH (https://mainmatter.com), released under the Creative Commons Attribution-NonCommercial 4.0 International license.

About

Mailer for the contact form on mainmatter.com – Cloudflare worker written in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published