mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 02:28:31 +01:00
20 lines
606 B
C#
20 lines
606 B
C#
|
using System.Net.Http;
|
||
|
using System.Threading;
|
||
|
using System.Threading.Tasks;
|
||
|
using BTCPayServer.Client.Models;
|
||
|
|
||
|
namespace BTCPayServer.Client
|
||
|
{
|
||
|
public partial class BTCPayServerClient
|
||
|
{
|
||
|
public virtual async Task SendEmail(string storeId, SendEmailRequest request,
|
||
|
CancellationToken token = default)
|
||
|
{
|
||
|
using var response = await _httpClient.SendAsync(
|
||
|
CreateHttpRequest($"api/v1/stores/{storeId}/email/send", bodyPayload: request, method: HttpMethod.Post),
|
||
|
token);
|
||
|
await HandleResponse(response);
|
||
|
}
|
||
|
}
|
||
|
}
|