Advertisement
CFDatabase

Email thing - 12GaugeNick

Jul 28th, 2016
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.69 KB | None | 0 0
  1. -- Made by 12GaugeNick - ROBLOX
  2. -- Just a simple email thing
  3. -- If you get this working send me a PM telling me how.
  4. -- This was made in about 10 minutes
  5.  
  6. -- HTML / PHP code
  7.  
  8. <html>
  9.     <!-- Made by 12GaugeNick, https://www.roblox.com/users/44831585/profile -->
  10.     <!-- The code here is also meant as a PHP test API from ROBLOX.com (https://www.roblox.com) -->
  11.     <?php
  12.         // PHP password
  13.         //if (isset($_REQUEST['key'])) {
  14.         if ($_REQUEST['key'] == '00110001001100100011011000110111011010110110010101111001') {
  15.        
  16.             // PHP session login (Even though its a API)
  17.             session_start();
  18.             $_SESSION = array();
  19.            
  20.             // Session data
  21.             $_SESSION['header'] = $_GET['header'];
  22.             $_SESSION['email'] = $_GET['id'];
  23.             $_SESSION['subject'] = $_GET['subject'];
  24.             $_SESSION['message'] = wordwrap($_GET['message'], 70, "\r\n");
  25.  
  26.             // send email
  27.             $response = mail($_SESSION['email'], $_SESSION['subject'], str_replace("\n.", "\n..", $_SESSON['message']), $_SESSION['header']);
  28.            
  29.             // Return response
  30.             echo $response;
  31.        
  32.             // PHP session logout (Data security)
  33.             session_destroy(); // Destroy any data from the session
  34.         } else {
  35.             echo 'Invalid access key!';
  36.         };
  37.     ?>
  38. </html>
  39.  
  40. -- Lua code
  41.  
  42. local host = ""
  43. local key = "00110001001100100011011000110111011010110110010101111001"
  44.  
  45. local http = game:GetService("HttpService")
  46. local _GET = function(...) return http:GetAsync(...) end
  47.  
  48. function send(email, subject, message, header)
  49.     local url = host.."?key="..key.."&id="..email.."&subject="..subject.."&message="..message.."&header="..header
  50.     warn(url)
  51.     return _GET(url)
  52. end
  53.  
  54. while wait(3) do
  55.     local result = send("EMAIL REMOVED", "testing?", "hi", "From: ROBLOX")
  56.     print(result)
  57. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement