Changed send mail message to return on callback
Updated lib/core