restsend / smtppreview

SMTP Preview and test tools, view outgoing email in a web UI, build withVue3 + Tailwind

Home Page:https://restsend.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SMTP Preview - SMTP Test tools

SMTP Preview is a tool for testing and inspecting email sending. It allows you to preview the layout and notification appearance of emails on different clients, as well as detecting potential SPAM warnings. It can be integrated into the development process for SMTP sending tests.

SMTP Preview is maintained by restsend.com.

Screenshot

Quick start

SMTP Preview is written in Golang, and running smtppreview requires the Golang development environment. If you do not have the Golang development environment, you can refer to the official documentation of golang.

  • Run smtppreivew via docker, the default smtp serve port is 9025
docker run -ti --rm -p 9025:9025 -p 8000:8000 restsend/smtppreview
  • Visit web console, http://localhost:8000

  • Send test mail via python code:

import smtplib
from email.mime.text import MIMEText
from email.header import Header

message = MIMEText('Hello SMTP Preview', 'plain', 'utf-8')
message['From'] = Header("unittest@restsend.com", 'utf-8')
message['To'] = Header("oss@restsend.com", 'utf-8')

subject = 'Hello SMTP Preview'
message['Subject'] = Header(subject, 'utf-8')

conn = smtplib.SMTP('localhost', port=9025)
# Mock login
conn.login('you@restsend.com', 'smtppreview')

r = conn.sendmail('you@restsend.com',
                  ['oss@restsend.com', 'hello@restsend.com'],
                  message.as_string())

print('send ok, result:', r)

How SMTP Preview work?

About

SMTP Preview and test tools, view outgoing email in a web UI, build withVue3 + Tailwind

https://restsend.com

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 69.6%Language:Vue 25.1%Language:JavaScript 2.4%Language:Python 1.9%Language:HTML 0.5%Language:Dockerfile 0.5%Language:CSS 0.1%