Could you please suggest a simple SMTP server with the very basic APIs (by very basic I mean, to read, write, delete email), that could be run on a linux box? I just need to
If you want to quickly test Django's send_mail with hasen's answer above:
# Skip lines 3 and 4 if not using virtualenv.
# At command prompt
mkdir django1
cd django1
virtualenv venv
source venv/bin/activate
pip install django==1.11
django-admin startproject django1 .
# run the Django shell
python manage.py shell
# paste into shell following:
from django.core.mail import send_mail
send_mail(
'Subject here',
'Here is the message.',
'from@example.com',
['to@example.com'],
fail_silently=False,
)
# This should write an email like the following:
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: Subject here
From: from@example.com
To: to@example.com
Date: Wed, 02 May 2018 02:12:09 -0000
Message-ID: <20180502021209.32641.51865@i1022>
Here is the message.
Not necessary to have valid values in send_mail function. Above values will work just fine with hasen's example.