Mails send separatly. Input text used.

Res T123,T124
This commit is contained in:
Marcel Kapfer (mmk2410) 2016-11-20 08:47:12 +01:00
parent 199a89a8d4
commit a3c02b057d
8 changed files with 129 additions and 37 deletions

View file

@ -3,8 +3,21 @@
# MIT License
main = ->
###
$("#send").click ->
url = "/res/php/sendmail.php"
data = new FormData
data.append "json", JSON.stringify
a: 1
b: "test"
request = new Request url,
method: 'POST'
body: data
fetch request
.then (response) ->
console.log response
###
###
url = "./res/php/sendmail.php?list=" + $("#address_list").val() +
"&template=" + $("#templates_list").val()
$.get url, (data) ->
@ -12,7 +25,8 @@ main = ->
alert "Mail sent!"
else
alert "Sending mail failed!"
###
updateAddressLists()
updateTemplateLists()