Here are the details for the classes and properties used in my previous post:
Simple Mail Transfer Protocol is an Internet standard for email transmission across IP networks.
System.Net.Mail: It is namespace contains classes used to send e-mail to a Simple Mail Transfer Protocol server for delivery.
In the previous post, following two classes of System.Net.Mail are used:
Simple Mail Transfer Protocol is an Internet standard for email transmission across IP networks.
System.Net.Mail: It is namespace contains classes used to send e-mail to a Simple Mail Transfer Protocol server for delivery.
In the previous post, following two classes of System.Net.Mail are used:
- MailMessage - represents the contents of mail message.
- SmtpClient - transmit email to the SMTP host that you designate for mail delivery.
Note: We can also use "Attachment class" to create mail attachment.
Details about properties and functions of MailMessage class which are used in our program:
- MailMessage.From - Gets or Sets the from address for current email message
- MailMessage.Subject - Gets or Sets the subject line for current email message
- MailMessage.Body - Gets or Sets the message body
- Mail.To - Gets the address collection that contains the recipients of current email message
- Mail.To.Add() adds the recipients address to the address collections.
- MailMessage.DeliveryNotificationOptions - Gets or Sets the delivery notifications for current email message.
- In our app, we are using DeliveryNotificationOptions.OnFailure which notify if the delivery is unsuccessful.
- SmtpClient.Credentials - Gets or Sets the credentials used to authenticate the sender
- SmtpClient.Port - Gets or Sets the port used for SMTP transction.
- SmtpClient.Host - Gets or Sets the name or IP address of the host used for SMTP transactions.
- SmtpClient.EnableSsl - Specify whether the smtpclient uses Secure Sockets layer (ssl) to encrypt the connection.
- SmtpClient.Send(MailMessage) - Sends the specified message to a SMTP server for delivery.
Comments
Post a Comment