Parses command-line flags for SMTP to HTTP server configuration.
// Source: https://github.com/alash3al/smtp2http | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package main
import "flag"
var (
flagServerName = flag.String("name", "smtp2http", "the server name")
flagListenAddr = flag.String("listen", ":smtp", "the smtp address to listen on")
flagWebhook = flag.String("webhook", "http://localhost:8080/my/webhook", "the webhook to send the data to")
flagMaxMessageSize = flag.Int64("msglimit", 1024*1024*2, "maximum incoming message size")
flagReadTimeout = flag.Int("timeout.read", 5, "the read timeout in seconds")
flagWriteTimeout = flag.Int("timeout.write", 5, "the write timeout in seconds")
flagAuthUSER = flag
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key