Search Tools Links Login

Send EMAIL your local machine with/without SMTP


Visual Basic 6, or VB Classic

Send your emails without SMTP email server on your local machine. You cand create email list and send emails your list ! Easy & powerful !
Thanx for votes..

Original Author: B.Cem HANER

Inputs

Microsoft CDO for Windows 2000 (XP,2000,2003)

Code

You must add tis reference your project:
Microsoft CDO for Windows 2000 (XP,2000,2003)
Insert this code Command1_Click event. And run !
Ok john. Please dont worry and don't
hate :) If you are using SMTP server
please add this lines.. Goog luck
!
If you are using SMTP server please add this lines your code.
'------------------
Mail.Configuration.Fields.Item("smtpserver") = "smtp.yourserver.com"
Mail.Configuration.Fields.Item("smtpserverport") = 25
Mail.Configuration.Fields.Update

------ STANDART TEXT MESSAGE SEND -----------
Dim Mail As CDO.Message
Set Mail = New CDO.Message
Mail.From = "yourmailORother@mail.com"
Mail.To = "alexis@mail.com"
Mail.Subject = "Your subject"
Mail.TextBody = "MySubject"
Mail.Send
:) OK Your mail is sent !
------ USING CC & BCC FIELDS ------------
Dim Mail As CDO.Message
Set Mail = New CDO.Message
Mail.Subject="Sending email with CDO"
Mail.From="mymail@mydomain.com"
Mail.To="someone@somedomain.com"
Mail.Bcc="someoneelse@somedomain.com"
Mail.Cc="someoneelse2@somedomain.com"
Mail.TextBody="This is a message."
Mail.Send
------ SENDING HTML TYPED MAIL ------------
Dim Mail As CDO.Message
Set Mail = New CDO.Message
Mail.Subject="Sending email with CDO"
Mail.From="mymail@mydomain.com"
Mail.To="someone@somedomain.com"
Mail.HTMLBody = "

This is a message.

"
Mail.Send
------ SENDING HTML MAIL FROM WEB PAGE ----------
Dim Mail As CDO.Message
Set Mail = New CDO.Message
Mail.Subject="Sending email with CDO"
Mail.From="mymail@mydomain.com"
Mail.To="someone@somedomain.com"
Mail.CreateMHTMLBody "http://www.w3schools.com/asp/"
Mail.Send
%>
------ SENDING HTML MAIL FROM WEB PAGE ----------
Dim Mail As CDO.Message
Set Mail = New CDO.Message
Mail=CreateObject("CDO.Message")
Mail.Subject="Sending email with CDO"
Mail.From="mymail@mydomain.com"
Mail.To="someone@somedomain.com"
Mail.CreateMHTMLBody "c:webs est.htm"
Mail.Send
------ SENDING MAIL WITH ATTACHMENT OPTION -----
Dim Mail As CDO.Message
Set Mail = New CDO.Message
Mail.Subject="Sending email with CDO"
Mail.From="mymail@mydomain.com"
Mail.To="someone@somedomain.com"
Mail.TextBody="This is a message."
Mail.AddAttachment "c:mydocuments est.txt"
Mail.Send

About this post

Posted: 2003-06-01
By: ArchiveBot
Viewed: 122 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.