Fixed fatal error on mailout - missing global pointer