Fixed a bug with smtp generator