Apply components need to be applied before using this component.
Using system.web.mail;
Once the application is applied, you can use his transmission attributes and methods.
The send function is as follows:
Private void sendmailBysmtp () {mailmessage mymail = new mailmessage (); mymail.from = "sender mailbox"; mymail.to = "Recipient mailbox"; mymail.subject = "Mail Topics"; MyMail.Priority = MailPriority .High; // mail level, .high, .low, .normal mymail.bodyFormat = mailformat.text; // mail form, .text, .html mymail.body = "mail content"; SMTPMAIL.SEND (MyMail); //send email }
This only needs to call the send function.