steadyfi Posted March 11, 2015 Share Posted March 11, 2015 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 Link to comment
JR10 Posted March 11, 2015 Share Posted March 11, 2015 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
steadyfi Posted March 11, 2015 Author Share Posted March 11, 2015 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
JR10 Posted March 11, 2015 Share Posted March 11, 2015 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? Link to comment
steadyfi Posted March 11, 2015 Author Share Posted March 11, 2015 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
Nikolay_888 Posted August 6, 2015 Share Posted August 6, 2015 Hello guys. Now I try to send mails too. I don't know php well. I installed XAMPP, downloaded MTA-SDK and unzip it to 'xampp - htdocs - mta_sdk' (as in this tutorial). What I need to do then? Thank you Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now