comparison website/src/examples/upload-and-email.html.luan @ 1312:60d013d5c7ef

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 24 Jan 2019 21:56:53 -0700
parents e8020216dee7
children d3e61cd2aca0
comparison
equal deleted inserted replaced
1311:ca742d51b31f 1312:60d013d5c7ef
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@luanhost.com" 8 username = "smtp@luan.ws"
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@luanhost.com"; 49 from = "smtp@luan.ws";
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 }