This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Midnightas's profile picture

Craftmail - Send mails across servers!

Started by Midnightas, 22 February 2016 - 07:58 PM
Midnightas #1
Posted 22 February 2016 - 08:58 PM

THIS IS NOT A COMPETITOR TO THUNDERBIRD! THIS PROJECT WAS MADE FOR FUN!

Craftmail is a ComputerCraft program made to send mails across servers.

About:
SpoilerCraftmail is a program made for sending mails across servers.
Craftmail connects to a database on a website containing accounts.
This database contains accounts on one table and all mails on the other.
The user is able to delete mails from his inbox.
Craftmail's UI is designed to be simple.

Reminder: Craftmail is not competing with Thunderbird, it is a project made for fun and has nothing to do with it.

Screenshots:
Spoiler

How to Install:
Spoiler1. Craft a Floppy Disk
2. Open your Computer
3. Type "cd disk" without quotes
4. Type "pastebin get WYKUjMni json" without quotes
5. Type "pastebin get 2L74T65m craftmail" without quotes

To start the program type in "craftmail" without quotes.

Report Issues:
SpoilerThere may be many bugs in this program.
If you ever find one please send them here.
I will open a bug-tracking system on some website soon.
Pyuu #2
Posted 22 February 2016 - 09:59 PM
Why package json and craftmail separately? Or perhaps, make a single installer which downloads those two automagically.

This program works… but. Here are a few suggestions:
  1. No need for the connecting to remote server, press enter to continue.
  2. Need a way to get out of emailing someone, if I accidentally go to the send menu, I can't get out nicely.
  3. The startup screen that gives a menu should display most recent messages, instead of requiring going to the [ READ ] menu to be able to view recent messages.
  4. Needs multi-line support! Switch Enter from sending to new-line, then use CTRL + S to send (as a suggestion, of course.)
Midnightas #3
Posted 22 February 2016 - 10:09 PM
Not sure how to make an installer that installs multiple files.

Still, the multi-line support is going to be hard as heck to make.
I'll get rid of the prompt to press enter for now.

Thanks for the reply!
DannySMc #4
Posted 22 February 2016 - 10:26 PM
Not sure how to make an installer that installs multiple files.

Still, the multi-line support is going to be hard as heck to make.
I'll get rid of the prompt to press enter for now.

Thanks for the reply!

It is fairly simple actually, depends what type of multiline? Just printing out as multiline? Or actually typing as multiline? I have both if you need a hand :P/>
Waitdev_ #5
Posted 23 February 2016 - 06:23 AM
give an example of what an address looks like? also, what if users could host their own personal database
Midnightas #6
Posted 23 February 2016 - 10:35 AM
Not sure how to make an installer that installs multiple files.

Still, the multi-line support is going to be hard as heck to make.
I'll get rid of the prompt to press enter for now.

Thanks for the reply!

It is fairly simple actually, depends what type of multiline? Just printing out as multiline? Or actually typing as multiline? I have both if you need a hand
Typing as multiline, and printing if there's the typing.
Also yes, please!

give an example of what an address looks like? also, what if users could host their own personal database
The address is just the username you wish to send to.
Not sure how the personal databases would work.
Waitdev_ #7
Posted 23 February 2016 - 11:32 AM
give an example of what an address looks like? also, what if users could host their own personal database
The address is just the username you wish to send to.
Not sure how the personal databases would work.
it seems you're hosting a php script of your own website, if that script could be on just say if i used a website for hosting
DannySMc #8
Posted 23 February 2016 - 11:46 AM
Not sure how to make an installer that installs multiple files.

Still, the multi-line support is going to be hard as heck to make.
I'll get rid of the prompt to press enter for now.

Thanks for the reply!

It is fairly simple actually, depends what type of multiline? Just printing out as multiline? Or actually typing as multiline? I have both if you need a hand
Typing as multiline, and printing if there's the typing.
Also yes, please!

I shall have a look!

give an example of what an address looks like? also, what if users could host their own personal database
The address is just the username you wish to send to.
Not sure how the personal databases would work.

I can't see how people would need personal databases, that is silly, everything should be stored in one place, otherwise you make it harder for him to mess with. As for the php script, what is wrong with it?
Midnightas #9
Posted 23 February 2016 - 02:56 PM
I can't see how people would need personal databases, that is silly, everything should be stored in one place, otherwise you make it harder for him to mess with. As for the php script, what is wrong with it?
What PHP script?
Lupus590 #10
Posted 23 February 2016 - 07:04 PM
What PHP script?
https://en.wikipedia.org/wiki/PHP
Midnightas #11
Posted 23 February 2016 - 08:04 PM

Thank's a lot, I already know what PHP is.
The website it uses is practically PHP.
Midnightas #12
Posted 14 March 2016 - 03:01 PM
16 users! Wow!
This is about 10 times more successful than I thought it would be :D/>
LDDestroier #13
Posted 16 March 2016 - 07:57 PM
You thought you would get 1.6 users?
FUNCTION MAN! #14
Posted 16 March 2016 - 08:20 PM
How do you get a sixth of an user?
Creator #15
Posted 16 March 2016 - 08:33 PM
How do you get a sixth of an user?

One sixth is 0.166666666666. I think you were searching for 1+ 6/10. This translates to six tenths.

You might however argue that 1/6 * 10 kind of = 1.6
Midnightas #16
Posted 10 April 2016 - 03:02 PM
How do you get a sixth of an user?

One sixth is 0.166666666666. I think you were searching for 1+ 6/10. This translates to six tenths.

You might however argue that 1/6 * 10 kind of = 1.6
How do you get a sixth of an user?
You thought you would get 1.6 users?

Wow guys, just wow.
I said "about" :P/>
LDDestroier #17
Posted 10 April 2016 - 08:06 PM
My username is "Eldidi"
Send your messages heeeere
MineRobber___T #18
Posted 10 April 2016 - 11:51 PM
This isn't working for me. It says that line 318 is trying to index nil. I looked it up, and that's where you get the contents of the page.
Midnightas #19
Posted 11 April 2016 - 02:41 PM
This isn't working for me. It says that line 318 is trying to index nil. I looked it up, and that's where you get the contents of the page.
This usually is due to the web server being down.
If it doesn't work after about 12 hours then that's a severe problem.
jaredallard #20
Posted 12 April 2016 - 05:17 AM
Not sure how to make an installer that installs multiple files.

Still, the multi-line support is going to be hard as heck to make.
I'll get rid of the prompt to press enter for now.

Thanks for the reply!

If you want to be very unix-y, and follow the format as some clients. Use something like bash heredoc.

Essentially the bash format is like this:


mycommand <<<EOF
input
newlined input
more input
EOF

Programmatically it's very easy to implement. Parse the input line by line (as it's fed, using recursive funcs), when you get the string literal EOF terminate the "prompt". (don't use any string matching incase some does something like "Did you add an EOF to the program?")

Hope that helps :)/>
Lego Stax #21
Posted 15 April 2016 - 05:47 PM
Looks pretty cool! May I suggest adding the ability to send attachments? That would be really cool!
Midnightas #22
Posted 26 April 2016 - 08:59 PM
Thanks! Not sure how attachments would work, though.
Lupus590 #23
Posted 26 April 2016 - 10:08 PM
Thanks! Not sure how attachments would work, though.

read file to a table, serialise table, send
receive, un-searialise table, write to file
Midnightas #24
Posted 27 April 2016 - 08:56 AM
Looks pretty cool! May I suggest adding the ability to send attachments? That would be really cool!
Thanks! I'll try doing that, however I might have to learn the code I used again :P/>
Saddamo #25
Posted 29 April 2016 - 08:16 PM
getting error with "read email"

if somebody is bored username to send email to "Saddamo"
Mumbai #26
Posted 17 May 2016 - 05:36 PM
Is there a certain specifications besides Advanced Computer you need? For some reason it does not work for me. Thanks
randomdude999 #27
Posted 19 May 2016 - 05:31 PM
You are sending passwords in plain text over plain HTTP. Actually, you are sending everything in plain text over plain HTTP. Also, all information is in the URL of the request. This means that anyone with even the most basic snooper could read all usernames, passwords and sent emails (if they can somehow MITM the connection between your server and the client). For starters, there is HTTP POST, which can easily be used to send all kinds of data, including files. Also, you should hash the passwords and if you like open source then you should also make the PHP script running on the server public.
ztc0611 #28
Posted 30 May 2016 - 11:05 PM
When attempting to read emails at line 251.

EDIT: It was an error with the installation, sorry.

Are you going to make a Pocket Computer optimized version?
Edited on 30 May 2016 - 10:47 PM
Baaleos #29
Posted 31 May 2016 - 02:38 PM
There is a crypto api isnt there?
http://www.computercraft.info/forums2/index.php?/topic/22444-crypto-api/

or was this a poc?

TOR mail would be an interesting addition to computercraft.
it being across TOR, would make it theoretically p2p - without the 'man in the middle' risk.
However, that being said - since computercraft does not have native tor capabilities, it would probably need to rely on http posts to a tor enabled proxy/script as a gateway to the tor network.
Once you hit the gateway however, the TOR id/onion address would be enough to route your messages to the desired person without having to rely on a central db.
If it could use a blockchain - it would even remove the need for the user to be online to receive the messages.
ztc0611 #30
Posted 03 June 2016 - 01:41 AM
Can you add support for Shift+Enter for multi-line? That would be cool! :D/>

Also there should probably be a "Send Mail y/n" when you press enter, and a way to cancel sending mail.

Finally, I think the Subject and Body are switched in the Read tab, as it prints some of the body next to the username.
Edited on 02 June 2016 - 11:43 PM