Fixed critical errors

Added safe filter instead of raw
Added gmail transport config settings
Use statements, APC loader, and type hinting