public static int IsOfficialMail(IntPtr l)
    {
        int result;

        try
        {
            MailComponent mailComponent = (MailComponent)LuaObject.checkSelf(l);
            Mail          mail;
            LuaObject.checkType <Mail>(l, 2, out mail);
            bool b = mailComponent.IsOfficialMail(mail);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, b);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }