Thanks to work by my friend OrangeCrush (https://github.com/OrangeCrush), I have been able to make this little function.
Also, John for the original idea on this.
Most of the credit goes to OrangeCrush because hes the one who helped with the anti-login portion, made the anti-spam portion, and interfaced/setup everything. It uses NodeMailer by andris9 to send the mail.
What does it do?
Well, it allows for you to send an email to a specific address. Its pretty neat.
What can I use this for?
For any number of things included but not limited to: errors, level up notifications, etc.
Main usage -- SMS Text Messages to mobile phones. Check here to find out how to text you phone.
What can't I use this for?
Spam and sending people's login info (server has spam checks and some login checks)
Can I have the source code for the actual code that sends the mail?
Short answer: No (pm me and i may let you in on the secret)
Unfortunately, I cant release the source from the actual web portion of this as (1) I have no idea how it works or how to get the actual source files and (2) then everyone would be able to see the anti-login information portion and then it could easily be bypassed. (if you'd really like it I can look into getting this)
Actual Function:
Simba Code:Procedure SendEmail( address, message : String );
var
x : Integer;
sBuff, SafeMask : String;
Begin
//-----Message/URL Encoding---Written by BenJones on lazarus.freepascal.org-----
SafeMask := '0123456789abcdefghijklmnopqrstuvwxyz*@._-';
sBuff := '';
For x := 1 to Length(message) Do //Iterate over the entire string
Begin //Check if we have a safe char
If (pos(message[x], SafeMask) > 0) Then sBuff := sBuff + message[x]
Else If (message[x] = ' ') Then sBuff := sBuff + '+' //Append space
Else sBuff := sBuff + '%' + IntToHex(Ord(message[x])); //Convert to hex
End;
//----End URL Encode------------------------------------------------------------
If GetPage('http://webhost1.hp.af.cm/path?a=' + address +
'&m=' + sBuff) = '' Then
WriteLn('Attempted to send "' + message + '" to ' + address +
', but we were unable to reach the webhost to send it')
Else
WriteLn('"' + message + '" sent to ' + address)
End;
Usage:
Simba Code:.
SendEmail('email@email.com','Your Bot has encountered an error');
.
and if you want to just write your own function, but still use the online sendmail portion of this, youll need this URL:Note: Remember to encode your text to URL friendly text, ie SPACE needs to be written %20.Code:http://webhost1.hp.af.cm/path?a=ADDRESS&m=MESSAGE

