Skip to content

myvas/TencentSms

Repository files navigation

TencentSms

TencentSms github actions status

An ISmsSender implementation for TencentSms. (aka QcloudSms)

Demo

Myvas.AspNetCore.Authentication.Demo GitHub (Pre-)Release Date

NuGet

Myvas.AspNetCore.TencentSms NuGet GitHub (Pre-)Release Date

ConfigureServices

services.AddTencentSms(options =>
{
    options.SdkAppId = Configuration["TencentSms:SdkAppId"];
    options.AppKey = Configuration["TencentSms:AppKey"];
});

Inject & Invoke

private readonly ISmsSender _smsSender;

public XxxController(ISmsSender smsSender)
{
    _smsSender = smsSender ?? throw new ArgumentNullException(nameof(smsSender);
}

public IActionResult Xxx()
{
    //...
    var result = await _smsSender.SendSmsAsync(mobile, content);
}

API Implementation Status

Plan:

Dependencies:

DONE:

  • 国内发送短信(发送一条短信)
  • 国内群发短信(提交群发短信)