mocktools / go-smtp-mock

SMTP mock server written on Golang. Mimic any 📤 SMTP server behavior for your test environment with fake SMTP server.
MIT License
123 stars 17 forks source link

Feature/Add MessagesAndPurge to server #174

Closed mitar closed 6 months ago

mitar commented 6 months ago

This PR is made on top of https://github.com/mocktools/go-smtp-mock/pull/173 and that one should be merged first.

PR Details

Allows both getting messages and clearing them at the same time.

Related Issue

https://github.com/mocktools/go-smtp-mock/issues/119

Motivation and Context

In tests, it is useful to be able to reset the messages stored in the server.

How Has This Been Tested

I added two tests

Types of changes

Checklist

mitar commented 6 months ago

I addressed comments.

mitar commented 6 months ago

I rebased this one.

bestwebua commented 6 months ago

I rebased this one.

New PR's you can create directly without forking due you have write access ;)