Add mail functionality into the development branch (#12)

* Added basic code for sending emails
+ Added tests for emails
+ Modified README.md to reflect changes to .env file

* [create-pull-request] push formatted files

* Added dkim

* Fixed mistake in docker-compose.yml

Co-authored-by: Stefan <[email protected]>
This commit is contained in:
Stephan
2021-11-03 11:01:37 +01:00
committed by GitHub
co-authored by Stefan
parent 5c0bc20bfd
commit d596670f6b
8 changed files with 2254 additions and 65 deletions
+17
View File
@@ -0,0 +1,17 @@
process.env.NODE_ENV = "test";
import chai, { expect } from "chai";
import chaiaspromised from "chai-as-promised";
import mail from "../lib/mail";
chai.use(chaiaspromised);
const should = chai.should();
describe("mail", () => {
it("should succesfully send a email", async () => {
//NOTE THESE TESTS ONLY WORK WITH DEV BEING TRUE
const info = await mail.sendMail('"Chai Testing suite" <[email protected]>', "[email protected]", "Hello", "Test");
info.rejected.length.should.eq(0);
info.accepted.length.should.eq(1);
});
});