newsletter

This commit is contained in:
Alexander Heldt
2025-11-08 20:40:41 +01:00
parent 760f5ef4a6
commit 589a3b886a
10 changed files with 370 additions and 0 deletions

24
newsletter/HINTS.md Normal file
View File

@@ -0,0 +1,24 @@
# Hints
## 1. Read email addresses from a file
- The [`simplifile.read` function][file-read] can be used to read the contents of a file.
## 2. Create a log file for writing
- The [`simplifile.create_file` function][file-create] can be used to create an empty file.
## 3. Log a sent email
- The [`simplifile.append` function][file-append] can be used to append text to a file.
## 5. Send the newsletter
- All the necessary operations on files were already implemented in the previous steps.
- The [`result.try` function][result-try] and [`list.try_each` function][list-try-each] can be used to work with the `Result` type.
[file-read]: https://hexdocs.pm/simplifile/simplifile.html#read
[file-create]: https://hexdocs.pm/simplifile/simplifile.html#create_file
[file-append]: https://hexdocs.pm/simplifile/simplifile.html#append
[result-try]: https://hexdocs.pm/gleam_stdlib/gleam/result.html#try
[list-try-each]: https://hexdocs.pm/gleam_stdlib/gleam/list.html#try_each