SmtpClient class, SmtpClient
SmtpClient class
Allow applications to send emails using Simple Mail Transfer Protocol (SMTP.
Namespace: System.net. mail
Attribute
ClientCertificates: Specifies the certificate to use to establish a Secure Socket Layer (
The mail sending function is used in a recent project. This is different from the method used to send emails for a previous project. Previously, information about the emails to be sent was inserted into a database table on the server. The database
For the first time, I used this method to send an email. For example, I used my live mailbox to send an email to my QQ mailbox.
The steps for sending an email using smtpclient will not be discussed. You can find too many information on the Internet.
asp.net
First, IntroductionIn the last chapter, we analyzed in detail. Net Framework version 2.0 provides a new namespace (System.Net.Mail) and some new classes for sending e-mail messages (note:. NET Framework the namespace System.Web.Mail and
Recently, due to the needs of an R & I project, users require that the system send an email reminder or send an email every Monday to automatically collect data, therefore, I also found relevant materials and wrote a Demo to share with you, so that
Code 1: using system; using system. data; using system. web. ui; using system. data. oracleclient; using dbutility; using system. text. regularexpressions; using system. net; using system. net. mail; using system. XML; using system. net. mime; using
In the previous mailmessage saved as an EML file (C # + smtpclient), we used the Reflection Method to call system. net. mailwriter, the internal object of mail, implements saving mailmessage content as an EML file.
Through the previous
. Net has greatly improved the mail. smtpclient function since 2.0. It is easy to send emails. However, the US lacks the ability to save the email content as an EML file.
In fact, smtpclient and mailmessage have implemented this function, but this
ASP tutorial. NET Three send mail code (STMP, no component mail sent)
public bool Sendmails (){SmtpClient _smtpclient = new SmtpClient ();_smtpclient.deliverymethod = smtpdeliverymethod.network;//Specify how e-mail is sent_smtpclient.host = "IP
In the second article of the mail series, this article describes how to use mailmessage and smtpclient in the namespace system. net. Mail to send emails.
Using system;
Using system. collections;
Using system. text;
Using system. net;
Using system.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.