>HELP< Email spammer failing D:

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
5 posts Page 1 of 1
Contributors
User avatar
noobcake
Member
Member
Posts: 34
Joined: Sun Mar 27, 2011 12:16 am

>HELP< Email spammer failing D:
noobcake
Hey, I have made an email spammer and it is not working D:. the error is:
Code: Select all
A from address must be specified
Here is my code:
Code: Select all
Imports System.Net.Mail
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Timer1.Enabled = False
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Timer1.Enabled = True
    End Sub
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim smtp As New System.Net.Mail.SmtpClient("smtp.gmail.com", 587)
        Dim spam As Integer = amount.Text
        Dim smtpserver As New SmtpClient()
        Dim mail As New MailMessage()
        smtpserver.Credentials = New Net.NetworkCredential("MYEMAILADRESS@gmail.com", "MYPASSWORD")
        smtpserver.Port = 587
        smtpserver.Host = "smtp.gmail.com"
        smtpserver.EnableSsl = True
        If spam = 0 Then
            Timer1.Enabled = False
        Else
            mail.Subject = subject.Text
            mail.To.Add(whoto.Text)
            mail.Body = body.Text
            smtpserver.Send(mail)
            spam += -1

        End If

    End Sub

    Private Sub body_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles body.TextChanged

    End Sub
End Class
D: I don't know why it is doing this to me D:
Here is my design view:
Image

Thanks.
~Noobcake
If i Help you +Rep cooll;

Im new to visual basic so I probly wont :P
User avatar
Agust1337
Coding God
Coding God
Posts: 2456
Joined: Fri Feb 19, 2010 8:18 pm

Maybe the email must exist?
Top-notch casual Dating
User avatar
Axel
Coding God
Coding God
Posts: 1928
Joined: Sun Jun 27, 2010 9:15 pm

Re: >HELP< Email spammer failing D:
Axel
the from is not an email adress , but the display name
so
Mail.From="Thisisyourspamnamenottheemail"

Example
mailfrom.PNG
the highlighted is the Mail.from

I hope this will work ;)
You do not have the required permissions to view the files attached to this post.
http://vagex.com/?ref=25000
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: >HELP< Email spammer failing D:
mandai
Actually you would do it this way:
Code: Select all
mail.From = New MailAddress("user@source", "user")
User avatar
noobcake
Member
Member
Posts: 34
Joined: Sun Mar 27, 2011 12:16 am

~~~~~~~~~~~~~~~~~~~~~~~~~~~~LOCKED~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks guys
If i Help you +Rep cooll;

Im new to visual basic so I probly wont :P
5 posts Page 1 of 1
Return to “Coding Help & Support”