Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
A simple option is to fill the database with test emails (your own), then change the date / time on the server and see if the necessary emails arrive at the right dates and if anything extra comes.
It would be more correct to set up a local mail server that would receive all outgoing letters from your SMTP and, say, put them in the database, then write a unit test that would set the correct conditions (date, time, data, and everything that may be needed in your mailing list), run mailing script and validated sent letters in the database.
What is the script written in? Most likely, you can simply intercept the call to send a letter and replace it with your own validator, then creating tests will be elementary and there may already be ready-made solutions.
There was an excellent article http://habrahabr.ru/blogs/linux/49665/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question