> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFAccountManagementServerSendCustomAccountRecoveryEmailAsync

> 根據帳戶復原電子郵件範本，強制將電子郵件傳送至使用者帳戶已登錄的連絡人電子郵件地址

根據帳戶復原電子郵件範本，強制將電子郵件傳送至使用者帳戶已登錄的連絡人電子郵件地址

## 語法

```cpp theme={null}
HRESULT PFAccountManagementServerSendCustomAccountRecoveryEmailAsync(  
    PFEntityHandle titleEntityHandle,  
    const PFAccountManagementSendCustomAccountRecoveryEmailRequest* request,  
    XAsyncBlock* async  
)  
```

### 參數

**`titleEntityHandle`**   PFEntityHandle

使用 PFAuthenticationGetEntityWithSecretKeyAsync 取得之 Title 實體的 PFEntityHandle。

**`request`**   [PFAccountManagementSendCustomAccountRecoveryEmailRequest\*](/zh-TW/services/playfab/api-references/c/pfaccountmanagementtypes/structs/pfaccountmanagementsendcustomaccountrecoveryemailrequest)

已填入的要求物件。

**`async`**   XAsyncBlock\*<br />*Inout*

用於非同步作業的 XAsyncBlock。

### 傳回值

類型：HRESULT

此 API 作業的結果代碼。

## 備註

此 API 適用於 Win32、Linux 和 macOS。擁有有效電子郵件地址或使用者名稱的 PlayFab 帳戶，將能夠透過此 API 收到密碼重設電子郵件。傳送的電子郵件必須是帳戶復原電子郵件範本。可以傳入使用者名稱或電子郵件來傳送電子郵件。呼叫 XAsyncGetStatus 以取得作業狀態。如果服務呼叫失敗，非同步結果將為 E\_PF\_EMAIL\_CLIENT\_CANCELED\_TASK、E\_PF\_EMAIL\_CLIENT\_TIMEOUT、E\_PF\_EMAIL\_MESSAGE\_TO\_ADDRESS\_IS\_MISSING、E\_PF\_EMAIL\_TEMPLATE\_MISSING、E\_PF\_NO\_CONTACT\_EMAIL\_ADDRESS\_FOUND、E\_PF\_SMTP\_ADDON\_NOT\_ENABLED 或任何全域 PlayFab 服務錯誤。如需錯誤處理的詳細資訊，請參閱文件頁面「Handling PlayFab Errors」。

## 需求

**標頭：** PFAccountManagement.h

## 另請參閱

[PFAccountManagement 成員](/zh-TW/services/playfab/api-references/c/pfaccountmanagement/pfaccountmanagement_members)


## Related topics

- [Send Custom Account Recovery Email](/api-reference/account-management/send-custom-account-recovery-email.md)
- [PFAccountManagementSendCustomAccountRecoveryEmailRequest](/zh-TW/services/playfab/api-references/c/pfaccountmanagementtypes/structs/pfaccountmanagementsendcustomaccountrecoveryemailrequest.md)
- [PFAccountManagementSendAccountRecoveryEmailRequest](/zh-TW/services/playfab/api-references/c/pfaccountmanagementtypes/structs/pfaccountmanagementsendaccountrecoveryemailrequest.md)
- [PFAccountManagementClientSendAccountRecoveryEmailAsync](/zh-TW/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementclientsendaccountrecoveryemailasync.md)
- [PFAccountManagementServerSendEmailFromTemplateAsync](/zh-TW/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementserversendemailfromtemplateasync.md)
