Sending mail

A

Adriano

Hello,

I'm using VS.NET 2003, can anyone please send me a code for sending emails/

thanks in advance!
Adriano
 
P

Pieter

Public Sub ShowMail(ByVal strTo As String, Optional ByVal strSubject As
String = "", Optional ByVal strMessage As String = "")
Dim Appl As Object
Dim out As Object
Try
Appl = CreateObject("Outlook.Application")
out = Appl.CreateItem(0)
With out
.Subject = strSubject
.To = strTo
.Body = strMessage

'Send it!
'.Send()
'Open it!
.Display()
End With
Catch ex As Exception
ErrorMessage(ex)
End Try
End Sub
 
C

Carlos J. Quintero [VB MVP]

Hi Adriano,

If you want to use SMTP directly then see:

http://www.systemwebmail.net/faq/2.1.aspx

If you want to automate Outlook post again.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio 2005, Visual Studio .NET,
VB6, VB5 and VBA
You can code, design and document much faster in VB.NET, C#, C++ or VJ#
Free resources for add-in developers:
http://www.mztools.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top