I've managed to get my tiny little app to send an email with a click of a button using this code (this is just the email part): http://pastebin.com/nR5g28ct
But to avoid some error, I had to allow less secure apps in my account using the steps seen on this google support page. Gmail told me that's kind of bad thing, so I was wondering, is it really unsafe to do this? I was thinking about adding receiving emails also, but now I'm not so sure and I deleted my info from my source code even though it's just on my laptop and no one else has access to it (paranoid much?).