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.
To test the application, you use a source address, me@Company, and a target address,
you@Braindumps.biz.
You need to transmit the e-mail message. Which code segment should you use?

A. Dim MailFrom As New MailAddress("me@Company", "Me")
    Dim MailTo As New MailAddress("you@Company", "You")
    Dim Message As New MailMessage(MailFrom, MailTo)Message.Subject =
    "Greetings"Message.Body = "Test"Message.Dispose()
B. Dim SMTPClient As String = "smtp.Company."
    Dim MailFrom As String = me@Company
    Dim MailTo As String = you@Company
    Dim Subject As String = "Greetings"
    Dim Body As String = "Test"Dim Message As New MailMessage(MailFrom, MailTo,
    Subject, SMTPClient)
C. Dim MailFrom As New MailAddress("me@Braindumps.biz", "Me")
    Dim MailTo As New MailAddress("you@Braindumps.biz", "You")
    Dim Message As New MailMessage(MailFrom, MailTo)Message.Subject =
    "Greetings"Message.Body = "Test"
    Dim objClient As New SmtpClient("smtp.Braindumps.biz")objClient.Send(Message)
D. Dim MailFrom As New MailAddress("me@Braindumps.biz", "Me")
    Dim MailTo As New MailAddress("you@Braindumps.biz", "You")
    Dim Message As New MailMessage(MailFrom, MailTo)Message.Subject =
    "Greetings"Message.Body = "Test"
    Dim Info As New SocketInformationDim Client As New Socket(Info)
    Dim Enc As New ASCIIEncodingDim Bytes() As Byte =
    Enc.GetBytes(Message.ToString)Client.Send(Bytes)

Answer: C

No comments:

Post a Comment