Vb.Net-Informations.com



     VB.NET Communications Tutorial

 * VB.NET Send email using CDOSYS


VB.NET Send email using CDOSYS

Using CDOSYS is another easy way to send email from VB.NET . For sending email using CDOSYS , you have to send email from Windows 2000/XP and also you have to be enabled SMTP Service in IIS .

Requirements

  
Windows XP/ Windows2000
Internet Information Services (IIS)
SMTP Services in IIS should be enable.


         VB.NET Source Code Download           Print Source Code
         VB.NET Send email using CDOSYS - Download
        
Vb.Net Help

Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, 
	ByVal e As System.EventArgs) Handles Button1.Click
        Dim CDOSYS As Object
        Const cdoSendUsingPickup = 1
        Const strPickup = "c:\inetpub\mailroot\pickup"
        CDOSYS = CreateObject("CDO.Message")

        CDOSYS.Configuration.Fields.item _
	("http://schemas.microsoft.com/cdo/configuration/sendusing") _
	= cdoSendUsingPickup

        CDOSYS.Configuration.Fields.item _
	("http://schemas.microsoft.com/cdo/configuration" & _
	/smtpserverpickupdirectory")  _
	= strPickup

        CDOSYS.Configuration.Fields.Update()
        CDOSYS.To = "TO ADDRESS"
        CDOSYS.From = "FROM ADDRESS"
        CDOSYS.Subject = "CDO Test"
        CDOSYS.TextBody = "Send Email from vb.net using CDOSYS"
        CDOSYS.Send()
        CDOSYS = Nothing
        MsgBox("mail send")
    End Sub
End Class

You have to provide the informations like To Address , From Address and it is very important to enable your SMTP services in IIS .

VB.NET Communications Related Contents
*     How to send email from VB.NET
*     How to find IP Address of Host
*     How to read a URL Content
*     VB.NET Socket Programming
*     VB.NET Server Socket Program
*     VB.NET Client Socket Program
*     VB.NET MultiThreaded Socket Programming
*     VB.NET MultiThreaded Server Socket Programming
*     VB.NET MultiThreaded Client Socket Programming
*     VB.NET Chat Server Program
*     VB.NET Chat Server
*     VB.NET Chat Client

VB.Net Related Topics
*     Microsoft .Net Framework Tutorials
*     VB.NET Language Basics Tutorials
*     VB.NET Program Flow Control Tutorials
*     VB.NET Collections Tutorials
*     VB.NET String Tutorials
*     VB.NET Files Tutorials
*     VB.NET Excel 2007 Tutorials
*     VB.NET Crystal Reports Tutorials
*     VB.NET Communications Tutorial
*     VB.NET ADO.NET Tutorial with source code
*     ADO.NET Data Providers help and Tutorial
*     VB.NET ADO.NET Dataset Tutorial
*     ADO.NET DataAdapter and Dataset
*     VB.NET ADO.NET DataView Tutorial
*     VB.NET Remoting Tutorial
*     VB.NET XML Tutorial
Search here for more Vb.Net Source Code :


   Categories

    HOME
    VB.NET
    CSHARP

 
 
   













  |  Home   |  SiteMap   |  About   |
net-informations.com (C) 2010 All Rights Reserved