implement mail base helper which is used in admin & page helper, check for sinatra env in mail base helper