AZ-302 PDF wrong info for a question

Gian Dilawari

Member
Member
Joined
Jan 28, 2019
Messages
1
Reaction score
0
Points
1
Hello
There is one question where many PDF have wrong answers. AZ-302

HOTSPOT You develop solutions for a company. The company requires an automated email solution that can be used to schedule customer emails. Emails must be sent in one day. You need to implement the Azure Send Grid service API. How should you complete the code? To answer, select the appropriate options in the answer area'
NOTE: Each correct selection is worth one point.

Here is code from Microsoft site and a link:


Answers required are shown in RED below. Message Sendat is not below but - it is hard to read but should be once a day

The following examples show how to send an email message using the SendGrid Web API with a console application.

using System;
using System.Threading.Tasks;
using SendGrid;
using SendGrid.Helpers.Mail;

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

static async Task Execute()
{
var apiKey = System.Environment.GetEnvironmentVariable("SENDGRID_APIKEY");
var client = new SendGridClient(apiKey);
var msg = new SendGridMessage()
{
From = new EmailAddress("[email protected]", "DX Team"),
Subject = "Hello World from the SendGrid CSharp SDK!",
PlainTextContent = "Hello, Email!",
HtmlContent = "<strong>Hello, Email!</strong>"
};
msg.AddTo(new EmailAddress("[email protected]", "Test User"));
var response = await client.SendEmailAsync(msg);
}
}
}
 
Top