C # uses your own mail sending components to send mail ~

zhaozj2021-02-16  114

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.

转载请注明原文地址:https://www.9cbs.com/read-8654.html

New Post(0)