Build the future of communications.
Start building for free
  • By Niels Swimberghe
    Find your U.S. Representatives and Congressional Districts with SMS and ASP.NET Core Find your Representatives & Congressional Districts with SMS and ASP.NET Core

    When someone runs for office in the United States of America (U.S.), they have to fulfill certain "Ballot Access Requirements" to become listed on the ballot. One of those requirements could be that you need a certain number of signatures per district. So when volunteers and campaign workers go out to gather signatures, it is instrumental to know which congressional district (CD) the signee belongs to. However, knowing which congressional district you are from is not common knowledge, especially in areas where the district cuts right through counties, cities, and neighborhoods.

    States redraw their congressional districts every decade after getting an updated population count from the Census Bureau. Each district is represented by a single U.S. representative in the U.S. House of Representatives. However, the manner in which these districts are drawn often result in unique and odd shapes which can be confusing. This is why constituents living just a …

    Read More
  • By Niels Swimberghe
    How to test SMS and Phone Call applications with the Twilio Dev Phone Test SMS and Phone Call apps with the Twilio Dev Phone

    Twilio empowers you to build applications using phone numbers, text messaging, and voice calling. You can test these phone network based applications using any phone and phone number, but how do you test these applications without a phone? Maybe you're wondering, why not use your phone, which I'll get to later, but first how?!

    Twilio Dev Phone to the rescue

    What is the Twilio Dev Phone

    The Twilio Dev Phone is a tool built on top of Twilio products that will let you send and receive phone calls and text messages from the browser. The Dev Phone is an open-source project on GitHub so feel free to read the source code and contribute to it. You can learn more about the Twilio Dev Phone in the docs.

    Why use Twilio Dev Phone

    As promised, here are some good scenarios when you'd want to use the Twilio Dev Phone instead …

    Read More
  • By Niels Swimberghe
    .NETアプリケーションにデフォルト設定を適用する方法 .NETアプリケーションにデフォルト設定を適用する方法

    この記事はNiels Swimbergheこちらで公開した記事(英語)を日本語化したものです。

    過去に投稿したチュートリアル記事「TwilioとC#および.NETのアプリケーションをより良く構成する方法(英語)」と「SendGridとC#および.NETのアプリケーションをより良く構成する方法(英語)」では、Microsoft.Extensions.ConfigurationAPIを使用してアプリケーションの改善方法をご紹介しました。本稿では、これらのチュートリアルのテクニックを基に、デフォルトのオプションを設定の特定の場所に保存し、別の場所から上書きする方法をご紹介します。 例を挙げて説明します。アプリケーションから送るメールの種類は様々で、ウェルカムメール、パスワードリセットメール、オファーメールなどがあります。メールの種類によって、メールアドレスを使い分けたほうがよい場合もあります。「no-reply@yourdomain.tld」のように、返信不要のアドレスを使うことが多いですが、オファーメールでは受信者からの返信を受け取ることに大きな価値があることもあります。そこで、返信不要のアドレスを使う代わりに、返信を営業担当者に転送し、顧客関係管理(CRM)システムと自動的に統合されるようなメールアドレスを使うことができます。

    本稿では、デフォルトの返信用アドレスとして「no-reply@yourdomain.tld」を使用しますが、オファーメールでは、例えば「offers@yourdomain.tld」のように別のメールアドレスを使用します。

    必要事項 …

    Read More
  • By Niels Swimberghe
    Provide default configuration to your .NET applications Provide default configuration to your .NET applications

    In a previous post I shared how you can better configure your .NET applications for Twilio and SendGrid using the Microsoft.Extensions.Configuration APIs. In this tutorial, I'll build upon the techniques from those tutorials and you'll learn how to store default options in one section of your configuration and override them with specific options from another section. Let me clarify using an example. Applications often send different types of emails, like welcome emails, password reset emails, offer emails, etc. Depending on the type of email, you may want to send them from a different email address. For most emails, you may be using something like 'no-reply@yourdomain.tld', but for offer emails, the replies to the email could be of value. So instead of using the same no-reply address, you could use an email address that will be routed to a sales person and maybe automatically integrates with a Customer Relationship Management (CRM) …

    Read More
  • By Niels Swimberghe
    Send Email and SMS from Google Forms using Zapier, SendGrid, and Twilio Send Email and SMS from Google Forms using Zapier, SendGrid, and Twilio

    Forms are one of the fundamental building blocks of the web. Almost all websites use forms to get feedback from users and to gather leads. Many of these forms integrate directly with a Customer Relationship Management (CRM) system, while others forward the form data directly to an email inbox.

    If you're building a form using a web framework, you can quickly integrate SendGrid's Email API or one of the SendGrid libraries to forward the data to an email inbox. However, sometimes there's no time to build a fully fledged form yourself, or the form's purpose is for a single short-lived campaign. In that case, you could use an off-the-shelf form product like Google Forms to get the job done quickly with minimal investment. You don't even have to sacrifice the form integrations, because with Zapier's workflow automation, you can integrate Google Forms with tons of products including SendGrid to send …

    Read More
  • By Niels Swimberghe
    How to better configure C# and .NET applications for SendGrid How to better configure C# and .NET applications for SendGrid

    There are a hundred different ways to provide configuration to your applications. For almost any programming language, you can use environment variables and .env files, but configuration can also be stored in other file formats like JSON, YAML, TOML, XML, INI, and the list keeps on going. However, in some scenarios configuration isn't pulled from files, but instead is pulled from Azure Key Vault, HashiCorp Vault, or a similar vault service. It is rare that your configuration will come from a single source. Luckily, there are APIs in .NET that can help you grab configuration from multiple sources and merge them together.

    In this tutorial, you'll start with an application that sends emails using Twilio SendGrid, where the configuration is fetched directly from the environment variables. You'll then refactor the app to

    • fetch configuration from multiple sources, specifically, JSON files, user-secrets, environment variables, and command-line arguments
    • bind the configuration …
    Read More
  • By Niels Swimberghe
    How to better configure C# and .NET applications for Twilio How to better configure C# and .NET apps for Twilio

    There are a hundred different ways to provide configuration to your applications. For almost any programming language, you can use environment variables and .env files, but configuration can also be stored in other file formats like JSON, YAML, TOML, XML, INI, and the list keeps on going. Though, in some scenarios configuration isn't pulled from files, but instead is pulled from a service like Azure Key Vault, HashiCorp Vault, or a similar vault service. It is rare that your configuration will come from a single source. Luckily, there are APIs in .NET that can help you grab configuration from multiple sources and merge them together.

    In this tutorial, you'll start with an application that sends text messages using Twilio Programmable SMS, where the configuration is fetched directly from the environment variables. You'll then refactor the app to

    • fetch configuration from multiple sources, specifically, JSON files, user-secrets, environment variables, and …
    Read More
  • By Niels Swimberghe
    What's new in the Twilio helper library for ASP.NET (v5.73.0 - April 2022) What's new in the Twilio helper library for ASP.NET (v5.73.0 - April 2022)

    The Twilio helper library for ASP.NET (Twilio.AspNet) is a community-driven open-source project to make integrating Twilio with ASP.NET easier, for both ASP.NET Core and ASP.NET MVC on .NET Framework. The library helps you with very common use cases like:

    • Responding to Twilio webhook requests with TwiML objects from the official Twilio SDK for C# and .NET.
    • Binding data from Twilio webhook requests to strongly typed .NET objects.
    • Validating webhook requests originate from Twilio and rejecting them if not.

    As .NET and ASP.NET is evolving, the Twilio.AspNet contributors are enhancing the library to take advantage of the newest capabilities and best practices. So what's new?

    What's old in Twilio.AspNet

    Actually, before I share the shiny new additions, let me share what is already part of the library. After all, this is the first blog post to share news about the library.

    Handle Twilio webhook requests with ASP.NET

    In previous versions …

    Read More
  • By Niels Swimberghe
    How to Send SMS without a Phone Number using C# .NET and an Alphanumeric Sender ID Send SMS without a Phone Number using C# and Alphanumeric Sender ID

    You can quickly buy a phone number using Twilio's Super Network and then use that phone number to send and receive SMS. However, not all applications require two-way messaging. What's more, there are a lot of use cases where one-way messaging is a better fit, for example: notifications, alerts, and verifications. For these kinds of scenarios, you should consider using an Alphanumeric Sender ID.

    In this tutorial, you will learn how to send SMS messages from an Alphanumeric Sender ID with C#, .NET, and Twilio Programmable SMS; but first...

    What is an Alphanumeric Sender ID

    An Alphanumeric Sender ID (or Alpha Sender) lets you send SMS messages from a sender ID that consists of a set of alphanumeric characters, instead of from a phone number.

    The biggest benefit of using Alpha Sender is that you can use an ID that is more recognizable to your users than a …

    Read More
  • By Niels Swimberghe
    SendGrid APIを使用し、C#と.NET 6でメールを送信する方法 SendGrid APIを使用し、C#と.NET 6でメールを送信する方法

    この記事はNiels Swimbergheこちらで公開した記事(英語)を日本語化したものです。

    メールは何十年も前から存在していますが、メールを大規模に送信することはいまだ困難です。Twilio SendGridなら、スケーラビリティを気にすることなくメールを送信できます。さらに、SendGridのAPIとSDKを使えば、数分でメール送信を開始できます。

    また、SMTPを基盤とする既存のコードベースがある場合は、SMTPプロトコルを使用することもできます。本稿では、SendGrid .NET SDKと.NET 6コンソールアプリケーションを使用してメールを送信する方法をご紹介します。

    必要条件

    チュートリアルを進めるには、以下の項目が必要です。

    • .NETをサポートするOS(Windows/Mac/Linux)
    • .NET 6 SDK(ダウンロード)
    • コードエディタまたはIDE(推奨: C#プラグインを導入したVS Code、Visual Studio、JetBrains Rider)
    • Twilio SendGridのアカウント(登録はこちらから)

    .NET(Core)の古いバージョンを使用している場合でも、本稿の手順を進めることができます。ただし、わずかな調整は必要となります。

    SendGridアカウントでメールを送信するための設定

    メールを送信する前に設定する項目が2つあります。

    1つ目は、Sender Authentication(送信者の認証)の設定です。送信者の認証は、送信者がメールを送信するメールアドレスまたはドメインを所有していることを確 …

    Read More
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.