Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sendOptions = {
- queueName = "My Mailgun queue", -- nie pamietam xD
- connectionAttempts = 3, -- jak sie nie uda połaczyć to ile razy ma próbowac
- connectTimeout = 5000, -- czas oczekiwania na odpowiedz ze strony web
- formFields = { -- tutaj data $_POST czyli to jest tabela jak bys w php dał print_r($POST);
- from="Excited User <excited@samples.mailgun.org>", -- $_POST['from']
- to="devs@mailgun.net", --$_POST['to']
- subject="Hello",
- text="Testing some Mailgun awesomness!",
- kronix="jakiscos" -- $_POST['kronix']
- },
- username="api", -- jesli web wymaga logowania inaczej usunąć albo ma byc puste
- password="key-3ax6xnjp29jd6fds4gc373sgvjxteol0", -- a nawet mozna nie dotykac chyba bo uzywane jest jesli potrzebne
- }
- fetchRemote( "http://twojastrona.pl/index.php", sendOptions, odpowiedz_z_web )
- function odpowiedz_z_web(data, info)
- outputDebugString( "mailgunComplete"
- .. " success:" .. tostring(info.success) -- czy sie powiodło
- .. " statusCode:" .. tostring(info.statusCode) --status odpowiedzi z serwera web
- .. " data:" .. tostring(data) -- data to wszystkie znaki wysłane z web <html><head> blablabla "sourcecode"
- )
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement