VB6 - EMAIL SENDER

All tutorials created in VB6 to be posted in here.
9 posts Page 1 of 1
Contributors
User avatar
utilities
Member
Member
Posts: 45
Joined: Wed Oct 21, 2009 1:23 pm

VB6 - EMAIL SENDER
utilities
OK welcome to codenstuff vb6.0 tutorial
I'm going to teach you on how to make an email sender using vb6.0

First of all open vb6.0 and select standard exe then
Add this.

1. one big textbox in the bottom of the form then
2. at the top of the big textbox put 6 textbox size what you want.
3. then put label on the side of 6 textbox.
4. label caption "SMTP server" , "Port" , "Username" , "password" , "To" , "Subject".
5. put 2 command and then put in the caption "Send" and the other one is "Reset"
6.put timer and set the interval to 50000 to 100000 and enable = false.

7. put this code in the "Send" button.
Code: Select all
Timer1.Enabled = True
Label7.Caption = "Please Wait....."
Set utilities = CreateObject("CDO.Message")
utilities.From = "New Email"
utilities.To = Text6.Text
utilities.Subject = Text7.Text
utilities.TextBody = Text1.Text
utilities.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
utilities.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
utilities.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
utilities.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = Text2.Text
utilities.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = Text3.Text
utilities.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = Text4.Text
utilities.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = Text5.Text
utilities.Configuration.Fields.Update
utilities.Send
8. Put this code at the "Reset button"
Code: Select all
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
9. And then Put This code in the Timer.
Code: Select all
MsgBox ("YOur Email was Successfully Send")
Timer1.Enabled = False
10. Save it and then Test It.




PS: I hope u Understand My tutorial.
You do not have the required permissions to view the files attached to this post.
Image
Image
User avatar
nelsonxd
Just Registered
Just Registered
Posts: 8
Joined: Thu Jul 08, 2010 4:55 pm

Re: VB6 - EMAIL SENDER
nelsonxd
men this work in window 7 ?
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: VB6 - EMAIL SENDER
mandai
I don't see why it wouldn't.
User avatar
GHOSTCORP
VIP - Donator
VIP - Donator
Posts: 5
Joined: Thu Jul 22, 2010 12:17 pm

Re: VB6 - EMAIL SENDER
GHOSTCORP
awsome
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1891
Joined: Wed Dec 16, 2009 9:56 pm

Re: VB6 - EMAIL SENDER
zachman61
it works in win 7 im currently using vb6 in win7
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
riottechtalk
New Member
New Member
Posts: 11
Joined: Sat Feb 19, 2011 4:12 am

Re: VB6 - EMAIL SENDER
riottechtalk
mind explaining what text1 is? (like is it subject, to?)
thx
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: VB6 - EMAIL SENDER
mandai
Text1.Text will be the message body.
User avatar
xawia
Just Registered
Just Registered
Posts: 3
Joined: Fri Sep 23, 2011 4:17 pm

Re: VB6 - EMAIL SENDER
xawia
Awesome! Thanks!
User avatar
utilities
Member
Member
Posts: 45
Joined: Wed Oct 21, 2009 1:23 pm

Re: VB6 - EMAIL SENDER
utilities
Sorry for not replying on your questions guys, i stop programming last 2 years because i need to focus on my studies i hope this tutorial help you :)

Thanks for everything.
Image
Image
9 posts Page 1 of 1
Return to “VB6 Tutorials”