Minor fixes.

This commit is contained in:
2026-09-24 16:45:18 +01:00
parent cefa98cdec
commit 1e27d7629f
7 changed files with 41 additions and 39 deletions
+7 -2
View File
@@ -1,7 +1,12 @@
# Mailer module
# Not to actually be used. proof of concept.
module Mail
def send(to, subject, body)
from_email = "infinsweeper@syedm.dev"
raise "Can't send email."
from_email = "infinsweeper@domain.com"
from_name = "InfinSweeper"
to = Array(to).map { |addr| { email_address: { address: addr, name: "" } } }
@@ -17,7 +22,7 @@ module Mail
uri = URI("https://api.zeptomail.com/v1.1/email")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Zoho-enczapikey #{ENV_HASH["ZOHO_PASS"]}"
req["Authorization"] = "Zoho-enczapikey #{ENV["ZOHO_PASS"]}"
req["Content-Type"] = "application/json"
req.body = payload.to_json