Separated the mailgun specifice functions from the message functions. Changed the sessions to sockets to remove confusion from actual sessions