Skip to main content
Version: SDK-6.0.0

DeleteMail

public BackndReturnObject DeleteMail(string postIndate);

Note

This function provides the same feature as Player.Post.SendPost of the previous mail function.

Parameter

ValueTypeDescription
postIndatestringindate of the user mail to delete

Description

Deletes a user mail from the mail list. Admin mail cannot be deleted.

Upon deletion, any items that have not been claimed will also be deleted.

Example

Synchronous

// Get the inDate of the user mail to delete.  
var bro = Backnd.PlayerMail.GetPlayerMailList();

string postIndate = bro.GetReturnValuetoJSON()["postList"][0]["inDate"].ToString();

Backnd.PlayerMail.DeleteMail(postIndate);

Asynchronous

// Get the inDate of the user mail to delete.  
Backnd.PlayerMail.GetPlayerMailList(callback =>
{
string postIndate = callback.GetReturnValuetoJSON()["postList"][0]["inDate"].ToString();

Backnd.PlayerMail.DeleteMail(postIndate, callback2 =>
{
// Post-process
});

});

Return cases

Success cases

When the deletion is successful
statusCode : 204
message : Success

Error cases

When a non-existent postIndate is entered
statusCode : 400
errorCode : ConditionalCheckFailedException
message : The conditional request faile