dir.by  
Поиск >>

Компьютер, программы
→
Microsoft Azure & Azure DevOps (cloud)
 Открывем Twilio SendGrid из Azure. Создаем ApiKey. Пишем c# приложение для отправки email 
посмотрели 6862 раз
обновлено: 30 July 2021
Шаг 1. Открываем сайт
Открываем https://portal.azure.com и вводим ваш Microsoft Account
Шаг 2. Открывем Twilio SendGrid из Azure
Шаг 3. Создаем account от кого будет отправлятьс email
Проверяем почту
team-for-next@hotmail.com

Открываем https://office.com
Шаг 4. Создаем Api Key
Копируем Api Key в буфер и нажимаем Done
Шаг 5. Пишем c# приложение для отправки email
  C#     Создаем новое C# консольное приложение... и напишем код
using SendGrid;
using SendGrid.Helpers.Mail;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
     internal class Example
     {
          private static void Main()
          {
               Execute().Wait();
          }

          static async Task Execute()
          {
               var apiKey = "SG.thBR2bwZQxqqPopMOg0...................."; // change Api Key
               var client = new SendGridClient(apiKey);
               var from = new EmailAddress("team-for...@hotmail.com", "Support");// change email
               var subject = "Sending with SendGrid is Fun";
               var to = new EmailAddress("aaaa@mail.ru", "Example User");// change email
               var plainTextContent = "and easy to do anywhere, even with C#";
               var htmlContent = "<strong>and easy to do anywhere, even with C#</strong>";
               var msg = MailHelper.CreateSingleEmail(from, to, subject, plainTextContent, htmlContent);
               var response = await client.SendEmailAsync(msg);
          }
     }
}
Добавим NuGet package
Запустим приложение и отправка email работает
Как я проверил: открыл почту aaaa@mail.ru и увидел, что пришло сообщение.
У меня на почту пришло сообщение в папку спам.
 
← Previous topic
Create an Azure Twilio SendGrid (to send emails)
 
Next topic →
FTPS Server on Azure
 
Your feedback ... Comments ...
   
Your Name
Your comment (www links can only be added by a logged-in user)

Новость "Черная пятница" Dreame в Беларуси – две недели скидок до 3400 рублей
 
Azure
• What is Microsoft Azure?
• How do I create a service in Azure?
<BR>Azure (Subscription)
• Create a Subscription in Azure
• How do I see my costs (how much money to pay per month, pay) in Azure?
• How to change the billing card number in Azure
<BR>Install Microsoft Authenticator on your phone
• Install Microsoft Authenticator on your phone and sign in to your account
<BR>Azure (Resource Group)
• Create a Resource Group in Azure
<BR>Azure (SQL Server)
• Build SQL Server in Azure
• Writing a C# program to use an Azure SQL Server database
• Save the SQL Server Azure database to your computer (backup)
• In SQL Server Azure Database, we set the cheapest price ($6 per month Basic)
<BR>Azure (Web service) for .Net Core 5.0 applications
• Create an Azure Web service with a Net Core 5 type. That is, we create an empty web server with the Net Core 5 type
• .Net Core 5 Web API app publish to Azure → | Using Visual Studio 2019
• Connect to the .NET Core 5 Web API (Azure Web Service) application via FTP | use FAR, File Explorer
Azure (Web App) for Angular 9.0 applications
• Creating an Azure Web Service for the Angular application. That is, create an empty web server
• Angular web application do publish to → Azure | use Visual Studio Code
• Connect to the Angular (Azure Web Service) application via FTP | use FAR, File Explorer
Azure Translators (Translator)
• Create Azure Translators (to translate text)
• Write a C# console application to translate text using Azure Translators
• Azure Translator error "is disabled and therefore marked as read only. You cannot perform any write actions on this subscription until it is re-enabled"
Twilio SendGrid (email)
• Create an Azure Twilio SendGrid (to send emails)
• Open Twilio SendGrid from Azure. Create an ApiKey. Writing a C# application to send an email
<BR>
FTPS Server on Azure
• FTPS Server on Azure
<BR>
Teams plug-in application
• Microsoft Teams web application (plug-in)" using React
• Creating an Azure Web Service for React Teams web application. That is, create an empty web server
• Appendix. Microsoft Teams web application publish to → Azure | use Visual Studio Code
• Upload app in teams
<BR>
Add a user
• Add a new user and make the user have access to the Subscription
Azure DevOps
• What is Azure DevOps?
<BR>
In DevOps, we create an organization. We create projects
• Get started with Azure DevOps. Creating an organization. Create a project (git repository)
<BR>
In DevOps, we invite the user
• In DevOps, we invite the user
• In DevOps, assign privileges to the invited user (so that the invited user can log in to DevOps)
<BR>
More about DevOps
• Azure DevOps pricing
• Sign in to Azure DevOps from the Chrome browser
• What does Azure DevOps contain in the Chrome browser?
• Azure DevOps. Commit files to git using Team Explorer in Visual Studio 2017
• Azure DevOps. How to add a link to git commit to a bug (using commit hash)

  Ваши вопросы присылайте по почте: info@dir.by