A piece of VB. NET code is used to generate and send emails. SMTP authentication username and password are supported.-E-mail topic-. NET tutorial

Source: Internet
Author: User

You can generate an email and send an email. After slight modification, you can write it as a com component and call it in ASP.
I will organize it into a complete one in the future.
--------------------------------------------------------------------------------
'-------------------------------------------------
'Generate the basic mail format (including attachments) and send the mail to the SMTP server,
'Can only be sent to the sender SMTP server (verification required). The direct delivery function is being compiled.
'
'Declaration: Some of the Code in this section signed the C # code of a Web hero. The original author name cannot be written because the original text cannot be found.
'
'Code writing: the header is too dizzy
'Qq: 2538288
'Msn: qq2538288@hotmail.com
'Blog: http://spaces.msn.com/members/headfaint http://blog.csdn.net/super852
'-------------------------------------------------
Imports System
Imports System. Text
Imports System. IO
Imports System. Net
Imports System. Net. Sockets
Imports System. Collections
Namespace eWebMail
Public Class Mail
'Mail class, generate the basic mail format. Author BLOG: http://spaces.msn.com/members/headfaint
Public Charset As String = "GB2312"
Public From As String
Public FromName As String
Public ReplyTo As String
Public Subject As String = ""
Public isHtml As Boolean = False
Public Body As String = ""
Public TextBody As String = "This is a HTML mail ."
Public RecipientMaxNum As Integer = 15 'maximum number of recipients access author BLOG: http://spaces.msn.com/members/headfaint
Public Recipient As New ArrayList

Related Article

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.