GithubHelp home page GithubHelp logo

magicodes.sms's Introduction

Magicodes.Sms

  短信服务核心库。
  官方网址:http://xin-lai.com
  开源库地址:https://github.com/xin-lai
  博客地址:http://www.cnblogs.com/codelove/
  交流QQ群:85318032
  小店地址:https://shop113059108.taobao.com/
  最新框架(完全支持.NET Core):https://gitee.com/xl_wenqiang/Magicodes.Admin.Core
  已更新为.NET标准库,支持.NET Core
  已编写单元测试,可以自行配置。

配置

        AliyunSmsBuilder.Create()
            //设置日志记录
            .WithLoggerAction((tag, message) =>
            {
                Console.WriteLine(string.Format("Tag:{0}\tMessage:{1}", tag, message));
            }).SetSettingsFunc(() =>
            {
                //TODO:请自行配置自己的配置
                //如果是一个项目多个配置,请使用key来获取相关配置
                return ConfigHelper.LoadConfig("aliyun_app");
            }).Build();

阿里云短信发送

    [Theory(DisplayName = "短信发送测试")]
    [InlineData("你的手机号码", "验证码")]
    public async Task SendCodeAsync_Test(string phone, string code)
    {
        var smsService = new AliyunSmsService();
        var result = await smsService.SendCodeAsync(phone, code);
        result.Success.ShouldBeTrue();
    }

magicodes.sms's People

Contributors

codelove1314 avatar xin-lai avatar xl-wenqiang avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.