Page 1 of 1

VB6 - EMAIL SENDER

Posted: Sun Dec 27, 2009 5:23 am
by 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.

Re: VB6 - EMAIL SENDER

Posted: Fri Jul 09, 2010 4:03 pm
by nelsonxd
men this work in window 7 ?

Re: VB6 - EMAIL SENDER

Posted: Fri Jul 09, 2010 5:50 pm
by mandai
I don't see why it wouldn't.

Re: VB6 - EMAIL SENDER

Posted: Thu Jul 22, 2010 2:16 pm
by GHOSTCORP
awsome

Re: VB6 - EMAIL SENDER

Posted: Thu Jul 22, 2010 2:34 pm
by zachman61
it works in win 7 im currently using vb6 in win7

Re: VB6 - EMAIL SENDER

Posted: Tue Mar 08, 2011 9:29 am
by riottechtalk
mind explaining what text1 is? (like is it subject, to?)
thx

Re: VB6 - EMAIL SENDER

Posted: Tue Mar 08, 2011 1:23 pm
by mandai
Text1.Text will be the message body.

Re: VB6 - EMAIL SENDER

Posted: Fri Sep 23, 2011 4:40 pm
by xawia
Awesome! Thanks!

Re: VB6 - EMAIL SENDER

Posted: Mon Feb 04, 2013 7:05 am
by 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.