Jump to content

[Help] MTA SDK and Mailing


steadyfi

Recommended Posts

Hello :)

Anyone knows how I can use the MTA SDK and the sendMailTo function ?

The wiki doesn't say anything but some websites say you need SMTP, some say you don't.

Anyone know how can I use it ? And do I need to fill the http_username and http_password variables in teh MTA_SDK.php file ?

These are my scripts:

send.php:

<?php 
include("mta_sdk.php"); 
$input = mta::getInput(); 
mail($input[0], $input[2], $input[3], "From: ".$input[1]."\n" . "Content-Type: text/html; charset=iso-8859-1\n");  
?> 

Server-Side LUA:

callRemote(http_url, EMailAccepted, accEmail, email_sender, email_title, tostring(email_text..vCode)) 

Note: email_text variable is defined and is a string

Note: http_url is my websites IP

Thanks :D

Link to comment

All you need for sendMailTo to work is to host both the mta_sdk.php file and the send.php file that is provided in the wiki page.

After you upload both files to your host, just update the link in callRemote to your website address.

Your server-side code is missing (if it's just that line), you need to define the EMailAccepted callback and any missing variable.

Link to comment
All you need for sendMailTo to work is to host both the mta_sdk.php file and the send.php file that is provided in the wiki page.

After you upload both files to your host, just update the link in callRemote to your website address.

Your server-side code is missing (if it's just that line), you need to define the EMailAccepted callback and any missing variable.

Nothing is missing !

do I need to fill the http_username and http_password variables in teh MTA_SDK.php file ?
Link to comment
No.

If nothing is missing the post your full code. You said that email_text and http_url are defined, where are the rest of the variables?

local http_url = "http://no-need-to-see-my-ip/send.php" --URL Path to SEND.PHP 
local email_sender = "[email protected]" --Use a business/junk email address to avoid spammers/scammers 
local email_title = "SERVER_NAME - Password Recovery" --Change "SERVER_NAME" 
local email_text = "You recently requested a password change on our server. Use this confirmation code to change you password using the 'Recover' tab in the GUI from /recover. vCode: " 
local accEmail = getAccountData(account, "ers.email") 
local vCode = math.random(1000,999999) 

Link to comment
  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...