Automated email sending software with attachment using visual basic 6.0
Here I will describe how to send email with attachment using visual basic 6.0?
We have many option to send email, here one question will arise why we are going to develop this software?
This is concept of email sending with attachment using Visual Basic 6.0. You can use this software to send automated email with one click. You can put this on startup of windows so you don’t have to login on webpage or any else. Simply login your computer and start to send automated email. This software can be used as a virus also like email bombarding.
Do the Following steps:
Open visual basic 6.0 program
Click on "Project" menu
Click on "Reference"
Check the "Microsoft CDO for Windows 2000 Library".
Click "OK".
On form simply draw one Command button.
Double Click on it and copy the below code and paste it under Command Button.
‘Start of Code
Private Sub Command1_Click()
Dim lobj_cdomsg As CDO.Message
Set lobj_cdomsg = New CDO.Message
lobj_cdomsg.Configuration.Fields(cdoSMTPServer) = "smtp.gmail.com" ‘in case of gmail
lobj_cdomsg.Configuration.Fields(cdoSMTPUseSSL) = True
lobj_cdomsg.Configuration.Fields(cdoSMTPAuthenticate) = cdoBasic
lobj_cdomsg.Configuration.Fields(cdoSMTPAccountName) = "your email [email protected]"
lobj_cdomsg.Configuration.Fields(cdoSMTPServerPort) = "465"
lobj_cdomsg.Configuration.Fields(cdoSendUserName) = "your email [email protected]"
lobj_cdomsg.Configuration.Fields(cdoSendPassword) = "your password"
lobj_cdomsg.Configuration.Fields(cdoSMTPConnectionTimeout) = 30
lobj_cdomsg.Configuration.Fields(cdoSendUsingMethod) = cdoSendUsingPort
lobj_cdomsg.From = "Your Name<Your email [email protected]>"
lobj_cdomsg.To = "Recipient email [email protected]"
lobj_cdomsg.Subject = "Subject"
lobj_cdomsg.TextBody = "Message"
lobj_cdomsg.AddAttachment "D:\Sanbik\test.doc"
lobj_cdomsg.Configuration.Fields.Update
lobj_cdomsg.Send
End Sub
‘End of Code
Note:-"Please Change the above black colored code with your own.
If you get any problem on this code kindly post your comment below.

[...] http://www.xploringminds.com/2010/09/make-your-system-faster.html http://www.xploringminds.com/2010/09/automated-email-sending-software-with.html http://www.xploringminds.com/2010/09/list-of-185-windows-xp-commands.html [...]
Hi.. I tried it.Nice work. It works completely. can u tell me how to receive email automatically in VB 6. because i have to built app in VB by which i can send and receive text (just like chatting application) on two different PCs via Email.
… [Trackback]…
[...] Read More here: xploringminds.com/2010/09/automated-email-sending-software-with.html [...]…
I get an error saying
Compile error
User-defined type not defined
and it highlights
Private Sub Command1_Click()
can you please help?