Minor fixes.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user