emailing in .net

mtaylor314

Member
Joined
Nov 30, 2006
Messages
19
Location
Cleves, OH
Programming Experience
Beginner
I am a vb newbie and I have a question concerning sending an email in an application. The application requires that I gather certain info from a db, sort it and then email it. I need to know what are all the steps in setting up this email server. Namespaces, etc. And if you know where I can get some sample code to review that as well. Thank you
 
Email Sending

You can either do this by calling a SQL Stored procedure that will sort the infromation and triger the email process. I don't have any sample code for that however.

But if you want to send it directly from the code I built a vb script that you can use to make it work. It uses the CDonts dll to send it. This should work from 2000 server or XP I haven't used it on 2003 yet. I hope this works for you.

Option Explicit
Dim Mail
Dim strMailTo

strMailTo = "email@email.com"
Set Mail = CreateObject("CDONTS.NewMail")
Mail.From = "email@email.com"
Mail.To = strMailTo
Mail.Subject = "DTS PACKAGE FAILURE on " & cstr(Subject as String)
Mail.Body = "DTS PACKAGE FAILURE on " & cstr(Subject as string)
Mail.Send
set Mail=nothing
 
Back
Top