You create an application to send a message by e-mail.

You create an application to send a message by e-mail. An SMTP server is available on the local
subnet. The SMTP server is named smtp.Braindumps.biz.
To test the application, you use a source address, me@Braindumps.biz, and a target address,
you@Braindumps.biz.
You need to transmit the e-mail message. Which code segment should you use?

A. MailAddress addrFrom(“me@Braindumps.biz”, “Me”);MailAddress
addrTo(“you@Braindumps.biz”, “You”);MailMessage message(%addrFrom,
%addrTo);message.Subject = “Greetings!”;message.Body = “Test”;message.Dispose();

B. String^strSmtpClient = “smtp.Braindumps.biz”;String^ strFrom =
“me@Braindumps.biz”;String^ strTo = “you@Braindumps.biz”;String^ strSubject =
“Greetings!”;String^ strBody = “Test”;MailMessage msg(strFrom, strTo, strSubject,
strSmtpClient);

C. MailAddress addrFrom(“me@Braindumps.biz”);MailAddress
addrTo(“you@Braindumps.biz”);MailMessage message(%addrFrom,
%addrTo);message.Subject = “Greetings!”;message.body = “Test”;SmtpClient
client(“smtp.Braindumps.biz”);client.Send(%message);

D. MailAddress^ addrFrom = gcnew MailAddress(“me@Braindumps.biz”, “Me”);MailAddress^
addrTo = gcnew MailAddress(“you@Braindumps.biz”, “You”);MailMessage^ message =
gcnew MailMessage(addrFrom, addrTo);message->Subject = “Greetings!”;message->Body =
“Test”;SocketInformation info;Socket^ client = gcnew
Socket(info);System::Text::ASCIIEncoding^ enc = gcnew
System::Text::ASCIIEncoding();array<unsigned char>^ msgBytes = enc-
>GetBytes(message->ToString());client->Send(msgBytes);

Answer: C

No comments:

Post a Comment