generated from openpeeps/pistachio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: George Lemon <georgelemon@protonmail.com>
- Loading branch information
1 parent
83809d6
commit c2e120f
Showing
4 changed files
with
26 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
# This is just an example to get you started. A typical library package | ||
# exports the main API in this file. Note that you cannot rename this file | ||
# but you can remove it if you wish. | ||
|
||
proc add*(x, y: int): int = | ||
## Adds two numbers together. | ||
return x + y | ||
# Asynchronous Nim client for | ||
# interacting with the MailerSend API | ||
# | ||
# Official MailerSend Documentation: | ||
# https://developers.mailersend.com | ||
# | ||
# (c) 2024 George Lemon | MIT License | ||
# Made by Humans from OpenPeeps | ||
# https://github.com/openpeeps/mailersend-nim | ||
import mailersend/[meta, email] | ||
export meta, email |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
# This is just an example to get you started. You may wish to put all of your | ||
# tests into a single file, or separate them into multiple `test1`, `test2` | ||
# etc. files (better names are recommended, just make sure the name starts with | ||
# the letter 't'). | ||
# | ||
# To run these tests, simply execute `nimble test`. | ||
# import unittest, mailersend | ||
|
||
import unittest | ||
# import dotenv | ||
# from std/os import getEnv | ||
# from std/macros import getProjectPath | ||
|
||
import mailersend | ||
test "can add": | ||
check add(5, 5) == 10 | ||
# test "can add": | ||
# dotenv.load(getProjectPath()) | ||
# var mls = initMailerSend(getEnv("api_key")) | ||
# let mail = newEmail() | ||
# mail.setSubject("Test email - This is a subject") | ||
# .setFrom("GoodGuest.ro", "noreply@goodguest.ro") | ||
# .setTo("George Lemon", "georgelemon@protonmail.com") | ||
# .setText("This is a plain text messsage") | ||
# # echo waitFor mls.send(mail) | ||
# echo waitFor mls.getQuota() |