Jump to content




HTTP Email Client

utility networking api

5 replies to this topic

#1 iAd4m

  • Members
  • 38 posts

Posted 19 April 2015 - 02:00 AM

Nameless Email API




I made this as I thought it would be cool to send emails across a server and I did it as something to do and it was a good learning experience. So here it is you can make your own client if you'd like the API-thingy will be below and should be relatively easy to understand. I will be releasing my own email client soon that you can use as a user rather then a developer so check back within a few days of this topic being posted.

Return Codes
Spoiler

There are two functions that you will need to use, loadJSON, which will check if you already have the json api installed if not it will download it from pastebin and put it in, ".emails/json". It also checks to make sure you have http enabled and if not it will tell you that you need to enable the http api. The other function is retrieve, it has 3 required parameters, username, password, and protocol, and a optional parameter sendData, sendData is used only for sending messages and I will go over how to do that in a second. The first two paramaters, username and password are super simple to understand, the password is encrypted on the PHP side of things with sha512 so you wont have to have any extra API's. The protocol parameter is easy aswell, there are three options you can put in there. Register, Fetch, and Send. If you enter an invalid protocol it will return with the return code 109. The optional sendData is only used when sending a message and it must be a table with the four following variables, to, the person the message is going to, from, the sender, subject, the subject of the message, and data, the long bunch of text that is usually in an email. Oops! Almost forgot, when you fetch emails they return as tables so for each email it will return as a table. Also there is another protocol, 'authenticated' will return 110. That should be it, if I have left anything out please let me know in the comments and I will fix it.

Pastebin:
http://pastebin.com/sgYCDbnP
pastebin get sgYCDbnP email

Edited by iAd4m, 02 May 2015 - 06:28 PM.


#2 Joelahughes

  • Members
  • 17 posts

Posted 22 April 2015 - 03:12 PM

Cool! I think I am going to make a client for it! :)

#3 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 22 April 2015 - 03:19 PM

Nameless.

#4 iAd4m

  • Members
  • 38 posts

Posted 25 April 2015 - 12:47 AM

View PostJoelahughes, on 22 April 2015 - 03:12 PM, said:

Cool! I think I am going to make a client for it! :)

Sweet, upload it here and ill add it to the topic
Im working with a friend on one aswell so that will be released soon. If you find any bugs let me know.

Edited by iAd4m, 25 April 2015 - 12:48 AM.


#5 the_blaster179

  • Members
  • 18 posts
  • LocationAustralia

Posted 29 April 2015 - 03:56 AM

Quote

patebin

You made a typo in the installation code.

#6 iAd4m

  • Members
  • 38 posts

Posted 02 May 2015 - 06:28 PM

View PostYourMCInformer, on 29 April 2015 - 03:56 AM, said:

Quote

patebin

You made a typo in the installation code.
Thanks Ill fix that now





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users