At the begining I thought I'll need to send text only through email. But the more I thought about it, I understood that I want to add three files to the mail as well. By altering previous code I managed to add simple Multipart MIME message support. In other words file attachments.