Skip to content

Mailbox module

The module that processes the app's mailbox feature on the Hive Axyl server. It provides sending and recalling mail, retrieving sent mail and received mail, marking received mail as read, and deleting mail.

Module information

  • Package: com.com2usplatform.hiveaxyl.mailbox
  • Namespace: Hive.Axyl.Mailbox
  • Supported platforms: All (server API)
  • Minimum requirements: Unity 6000.0+

Provided interfaces

Interface Registration method Description
IMailboxService AddMailbox() Sending and recalling mail, retrieving sent mail and received mail, marking mail as read, and deletion

For the feature structure, mail sender types, and how attached items are handled, see Mailbox.

Registration and retrieval

Register it with AddMailbox() in the registration step of HiveBootstrap.Initialize, and then retrieve it with HiveCore.Resolve<T>().

using Hive.Axyl.Core;
using Hive.Axyl.Core.Unity;   // HiveBootstrap
using Hive.Axyl.Mailbox;

var config = CoreConfig.CreateBuilder("{appId}").Build();

HiveBootstrap.Initialize(config, builder =>
{
    builder.AddMailbox();
});

IMailboxService mailbox = HiveCore.Resolve<IMailboxService>();

Every method of IMailboxService requires a login session. For the modules to install together, the installation procedure, and the order of initialization and login, see Install the module, initialize, and log in.