Added foundation for email gateway