C # write the Mail sending component that supports SMTP Authentication (1)

Source: Internet
Author: User
This is the first thing I wrote after I learned C #. There must be many mistakes. I hope you can correct them.
The reason for writing it is. the built-in SmtpMail of net does not support SMTP Authentication (I am surprised to say that, from ASP to ASP. NET, M $ mail components are always slow, CDONTS in ASP is rare to be used normally. in the NET era, SMTP servers must be verified before they can be used ,.. NET SmtpMail does not support verification. It is really ~~~), It took me several days to figure out how to get the original Jmail. NET, it is still relatively troublesome to use it. I just bought the "C # network programming", as a practical project, to make myself easier in the future, I wrote this thing.
The program architecture may be a bit messy, but it is all the faults left behind when I wrote ASP. If that person can help me tidy up a little, I am very grateful.
You are welcome to submit suggestions for modification, or modify the modification by yourself. It is best to Mail me the modified draft so that I can learn more.
The complete source code and compiled DLL can be downloaded from the following URL.
Http://huolx.t2008.com/class.asp? Classlevel = 3 & classname =. net technology & l2classname = ESmtpmail & articleid =-486856519
Paste the source code below.
Using System;
Using System. Text;
Using System. IO;
Using System. Net;
Using System. Net. Sockets;
Using System. Collections;
Namespace Huolx. Pubclass
{
/// <Summary>
/// <Para> Mail sending class that supports SMTP server authentication </para>
/// <Para> </para>
/// <Para> ver 1.0B </para>
/// <Para> attributes and method settings are similar to Jmail. </Para>
/// <Para> </para>
/// <Para> Huolx (flycloud@btamail.net.cn) copyright, reprinted please keep. </Para>
/// </Summary>

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.