You are here: Home / Documentation / How To's / How to use a fake SMTP / email server

How to use a fake SMTP / email server

by nguyen — published Aug 16, 2016 10:50 AM, last modified Aug 16, 2016 10:50 AM
Avoid sending out emails from your Plone site when you are testing

I have set up a "fake" SMTP server at the following address:

cmf2.it.uwosh.edu (141.233.143.13), port 8028

It accepts normal SMTP connections but instead of delivering the email messages, it writes them to a directory on the file system, which you can view at the following URL:

http://cmf2.it.uwosh.edu/fakemail-plonedev/

You must log in with the following credentials:

plonedev

drug483"Okie

For each email message it accepts, the fake SMTP server writes to a file named the following way:

[recipientaddress].[integer]

where the integers are incremented, starting at 1 every time the fake SMTP server is restarted.

This means that if I connect to this SMTP server and try to send an email to Nathan at vangheemn@uwosh.edu, the following file will be created:

vangheemn@uwosh.edu.1

Each message file contains all headers.

The SMTP server is accessible only from developer IP addresses (range 141.233.128.0/17).  Similarly, the URL above that shows you the captured email messages is accessible only from the same developer IP address range.  I just tested this from an off campus server and it was unable to connect to either.

You can use an online base64 decoder if Plone encodes the message body that way.  For example,

ClRoaXMgbGluayBpcyBzZW50IHRvIHlvdSBmcm9tIGh0dHA6Ly9sb2NhbGhvc3Q6ODA4MC9UZXN0
RmFrZVNNVFAKCllvdSBhcmUgcmVjZWl2aW5nIHRoaXMgbWFpbCBiZWNhdXNlIHNvbWVvbmUgcmVh
ZCBhIHBhZ2UgYXQKVGVzdCBmYWtlIFNNVFAgU2l0ZQphbmQgdGhvdWdodCBpdCBtaWdodCBpbnRl
cmVzdCB5b3UuCgpJdCBpcyBzZW50IGJ5IG5ndXllbkB1d29zaC5lZHUgd2l0aCB0aGUgZm9sbG93
aW5nIGNvbW1lbnQ6CiJtaW5pIGJyYWluIgoKV2VsY29tZSB0byBQbG9uZQoKQ29uZ3JhdHVsYXRp
b25zISBZb3UgaGF2ZSBzdWNjZXNzZnVsbHkgaW5zdGFsbGVkIFBsb25lLgoKaHR0cDovL2xvY2Fs
aG9zdDo4MDgwL1Rlc3RGYWtlU01UUC9mcm9udC1wYWdlCgotLSAKU2l0ZSBBZG1pbmlzdHJhdG9y
CgoK

decodes to:

This link is sent to you from http://localhost:8080/TestFakeSMTP

You are receiving this mail because someone read a page at
Test fake SMTP Site
and thought it might interest you.

It is sent by nguyen@uwosh.edu with the following comment:
"mini brain"

Welcome to Plone

Congratulations! You have successfully installed Plone.

http://localhost:8080/TestFakeSMTP/front-page

-- 
Site Administrator

 

Navigation