|
-
May 17th, 2013, 07:51 AM
#1
Thread Starter
New Member
Help with sending E-mails through VB.NET
First off i am new here!
I am not sure if i am posting in the right forum but oh well.
So down to the problem.
So i am creating a email program in vb, Microsoft visual studios 2012.
This isnt really an issue but more of a lack of knowledge.
Say i want to mass send an email, like 100 (used for example) emails to one address, How would i do this? i do already have the code for sending one email at a time on a gmail SMTP server but i want to make it so i can send multiple emails to one user.
And if there is anyone that would go as far as to explain on how to get this to work with a TrackBar much would be appreciated!
Code i already have:
Code:
Imports System.Net.Mail
Public Class Form1
Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click
End Sub
Private Sub Label3_Click(sender As Object, e As EventArgs) Handles Label3.Click
End Sub
Private Sub CloseToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CloseToolStripMenuItem.Click
Close()
End Sub
Private Sub AboutToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AboutToolStripMenuItem.Click
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim Mail As New MailMessage
Mail.Subject = "Test Email"
Mail.To.Add(TextBox4.Text)
Mail.From = New MailAddress(TextBox2.Text)
Mail.Body = TextBox1.Text
Dim SMTP As New SmtpClient("smtp.gmail.com")
SMTP.EnableSsl = True
SMTP.Credentials = New System.Net.NetworkCredential(TextBox2.Text, TextBox3.Text)
SMTP.Port = "587"
SMTP.Send(Mail)
End Sub
End Class
-
May 17th, 2013, 09:31 AM
#2
Re: Help with sending E-mails through VB.NET
Conceptually, create all objects for sending messages as you have done, loop thru say a collection of some sort that has the message text to send to the one user, set the body text and then send the message. If you want to check the status and success of each message you can define a delegate (SmtpClient.SendCompleted Event). Here is some sample code on MSDN. Also check out the following resource for SMTP messaging http://www.systemnetmail.com/default.aspx
-
May 17th, 2013, 10:57 AM
#3
Re: Help with sending E-mails through VB.NET
I think it's more of a point why would you send 100 emails to a single address.
-
May 17th, 2013, 11:53 AM
#4
Thread Starter
New Member
Re: Help with sending E-mails through VB.NET
Ok guys thanks for the one that helped me but you other two, if I wanted to be criticized for wanting to learn all aspects of vb programming then I would have posted this on 4chan.
-
May 17th, 2013, 12:46 PM
#5
Re: Help with sending E-mails through VB.NET
From my experience most email services will mark you as a spammer if you send too many emails in a short period - or to the same address. You will get blacklisted - doing something like this. Be careful - I watched one of my customers encounter this problem - and it's not an easy one to clear up.
And guys - really this is not chit chat. Respect is kind of requirement in a professional forum such as this. Why is everyone so sarcastic. Yuk
-
May 17th, 2013, 02:16 PM
#6
Thread Starter
New Member
Re: Help with sending E-mails through VB.NET
 Originally Posted by szlamany
From my experience most email services will mark you as a spammer if you send too many emails in a short period - or to the same address. You will get blacklisted - doing something like this. Be careful - I watched one of my customers encounter this problem - and it's not an easy one to clear up.
And guys - really this is not chit chat. Respect is kind of requirement in a professional forum such as this. Why is everyone so sarcastic. Yuk 
Well thank you for this! I will be using this through my neighbors/friends internet so im not worried about being blacklisted.
-
May 18th, 2013, 05:22 AM
#7
Re: Help with sending E-mails through VB.NET
 Originally Posted by HiddenAether
Well thank you for this! I will be using this through my neighbors/friends internet so im not worried about being blacklisted.
Hmmm......
-
May 19th, 2013, 09:27 PM
#8
Re: Help with sending E-mails through VB.NET
 Originally Posted by HiddenAether
Well thank you for this! I will be using this through my neighbors/friends internet so im not worried about being blacklisted.
So not only want you want to learn how to send out spam you're also going to do it by hijacking someone else's Internet connection?
Thread closed.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|