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 address@gmail.com"
lobj_cdomsg.Configuration.Fields(cdoSMTPServerPort) = "465"
lobj_cdomsg.Configuration.Fields(cdoSendUserName) = "your email address@gmail.com"
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 address@gmail.com>"
lobj_cdomsg.To = "Recipient email address@gmail.com"
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.
For Further Reading,


0 comments:
Post a Comment