comparison website/src/examples/upload-and-email.html.luan @ 1576:13135e289b50

domain change
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 28 Jan 2021 20:47:39 -0700
parents d3e61cd2aca0
children 0c46edec25dd
comparison
equal deleted inserted replaced
1575:0160650180bc 1576:13135e289b50
3 local Mail = require "luan:mail/Mail.luan" 3 local Mail = require "luan:mail/Mail.luan"
4 4
5 5
6 local send = Mail.Sender{ 6 local send = Mail.Sender{
7 host = "smtpcorp.com" 7 host = "smtpcorp.com"
8 username = "smtp@luan.ws" 8 username = "smtp@luan.software"
9 password = "luanhost" 9 password = "luanhost"
10 port = 2525 10 port = 2525
11 }.send 11 }.send
12 12
13 local function form() 13 local function form()
44 if email == nil then 44 if email == nil then
45 form() 45 form()
46 else 46 else
47 local file = Http.request.parameters.file 47 local file = Http.request.parameters.file
48 send{ 48 send{
49 from = "smtp@luan.ws" 49 from = "smtp@luan.software"
50 to = email 50 to = email
51 subject = "Upload and Email" 51 subject = "Upload and Email"
52 body = "file should be attached" 52 body = "file should be attached"
53 attachments = {file} 53 attachments = {file}
54 } 54 }