09.10.2010, 02:00
(
Последний раз редактировалось lolumadd; 09.10.2010 в 15:31.
)
The time is here, you don't need to install any more plugins to mail straight from your server. There is a new script to do that for you.
1. Go to my website and register your own email account. http://www.lolumadd.info/samp_mail/
2. Download the include and include it in your script.
3. You are now ready to send email via pawn code! Just include "samp_mail" and that is all!
Functions and Callbacks:
Examples:
http://www.lolumadd.info/samp_mail/
Download: http://www.lolumadd.info/samp_mail/samp_mail.txt
Hope you guys enjoy!
EDIT:
Due to people spamming through my site I decided to close it and release the source of my site.
SQL Dump:
Now just edit the include where it says lolumadd.info to your site name. Put this code in your site and voila.
In-Game Mailer
How To Get Started (3 easy steps):1. Go to my website and register your own email account. http://www.lolumadd.info/samp_mail/
2. Download the include and include it in your script.
3. You are now ready to send email via pawn code! Just include "samp_mail" and that is all!
Functions and Callbacks:
Код:
Syntax: SendEmail(playerid, email[], password[], emailto[], subject[], body[]); Example: SendEmail(1, "example", "password", "email@email.com", "otheremail@email.com", "My first email!", "Hi! This is my first ingame email!"); Callbacks: OnEmailResponse(playerid, response_code, data[])
Код:
COMMAND:sendmail(playerid, params[]) { new email[20],password[20],sendingemail[20],subject[20],body[128]; if(sscanf(params, "s[20]s[20]s[20]s[20]s[128]", email, password, sendingemail, subject, body)) SendClientMessage(playerid, 0x0000FF, "USAGE: /sendmail [email] [password] [sendto] [subject] [body]"); else { SendEmail(playerid, email, password, sendingemail, subject, body); } return 1; } public OnEmailResponse(playerid, response_code, data[]) { if(response_code == EMAIL_SUCCESS) SendClientMessage(playerid, 0x0000FF, "SUCCESS: The email has been sent"); return 1; }
Download: http://www.lolumadd.info/samp_mail/samp_mail.txt
Hope you guys enjoy!
EDIT:
Due to people spamming through my site I decided to close it and release the source of my site.
Код:
if($_GET['mail'] == 1) { $link = mysql_connect("localhost","mail","password"); mysql_select_db("mail"); $newpass=md5(crc32(sha1($_GET['p']))); $query = sprintf("SELECT `id` FROM `users` WHERE `email`='%s' AND `password`='%s' LIMIT 1", mysql_real_escape_string($_GET['e']),mysql_real_escape_string($newpass)); $access = mysql_query($query); if(mysql_num_rows($access) > 0) { mysql_close($link); $message = wordwrap($_GET['b'], 70); mail($_GET['t'],$_GET['s'],$_GET['b'],"From: ".$_GET['e']."@yoursite.com"); echo "Message Sent"; } }
Код:
-- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE IF NOT EXISTS `users` ( `id` int(20) NOT NULL AUTO_INCREMENT, `email` varchar(20) NOT NULL, `password` varchar(300) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=26 ; -- -- Dumping data for table `users` --