Local Output = text","body text") -Email address of the recipient, Subject of message, Body of message Once you have finished setting everything up, it’s time to actually send an email. Replace the ScriptId variable’s value in the ModuleScript, with a string of the ScriptId you copied earlier from your Google Apps Script project, and you are good to go! Example Code: "?q=".game.HttpService:JSONEncode()) -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. Local Success, ErrorStatement = pcall(function() Local HttpService = game:GetService("HttpService")įunction Module:SendEmail(Email, Subject, Message) -Email address of the recipient, Subject of message, Body of message "/exec" -creating the url from the ScriptId local ScriptId = "" -paste the ScriptId of your web app URL here Open Roblox Studio,and then either create a ModuleScript with the code below, or grab this module here. Then when the published page appears, copy the ScriptId, which is between /macros/s/ and /exec. This will be the email address that all of the emails you send come from. Log into the Google account that you want to use to send you emails( I recommend you set up an alternate account specifically for sending bot emails, so that people can’t impersonate you if they get hold of your ScriptId.). The first step is to create a new project inside of Google Scripts App, to run the JavaScript that handles the sending of the email. Step 1: Setting Up Your Project File Inside of Google Scripts App Without further ado, lets hop right into it. Google Apps Script is completely free, unlike setting up a decent web server can be, and works consistently with a max of 100 Emails a day with a non-paid account. Since Google Apps Script is already a Google program, it has a sendEmail from Gmail function already ingrained, making it extremely easy to send Emails. I used Google Apps Script to create this, for two main reasons: The code for this is extremely simple, but I thought I would make this post since I saw a lack of open source material for sending emails. In this tutorial, I’m going to show you how to send emails from a roblox script, using Google Apps Script.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |