Code used in this publication http://blazzerbg.blogspot.bg/2016/03/smart-socket-with-esp8266-evb-by-olimex.html
I modified example code provided here: https://github.com/OLIMEX/ESP8266/blob/master/Arduino%20IDE/Relay-Control-MQTT/firmware/relay-mqtt.ino
because it was too old and some of the import libraries already changed - I had to modify it in order to work.