Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ScriptId = "" --paste the ScriptId of your web app URL here
- local Url = "https://script.google.com/macros/s/" .. ScriptId .. "/exec" --creating the url from the ScriptId
- local HttpService = game:GetService("HttpService")
- local Module = {}
- function Module:SendEmail(Email, Subject, Message) --Email address of the recipient, Subject of message, Body of message
- local Success, ErrorStatement = pcall(function()
- Result = HttpService:GetAsync(Url .. "?q="..game.HttpService:JSONEncode({Email, Subject, Message})) --Result will either return true if the Email was sent successfully, or an error message string explaining what went wrong, if it failed to send.
- end)
- if Success then
- return Result
- else
- return ErrorStatement
- end
- end
- return Module
Add Comment
Please, Sign In to add comment