diff src/get_password.html.luan @ 6:a6be8817c05b

move mail_info to config
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 02 Jun 2022 19:18:12 -0600
parents dfc36e7ed22c
children 46f6b69e8b10
line wrap: on
line diff
--- a/src/get_password.html.luan	Wed May 18 00:21:44 2022 -0600
+++ b/src/get_password.html.luan	Thu Jun 02 19:18:12 2022 -0600
@@ -13,12 +13,8 @@
 local save_raw_config = Shared.save_raw_config or error()
 
 
-local send_mail = Mail.sender{
-	host = "smtpcorp.com"
-	username = "smtp@luan.software"
-	password = "luanhost"
-	port = 2525
-}.send
+local mail_info = config.mail_info or error "missing config.mail_info"
+local send_mail = Mail.sender(mail_info).send
 
 local function handle(email)
 	local change = Http.request.parameters.change ~= nil