Page 1 of 1

>HELP< Email spammer failing D:

Posted: Wed Apr 13, 2011 6:10 am
by 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

Re: >HELP< Email spammer failing D:

Posted: Wed Apr 13, 2011 7:44 am
by Agust1337
Maybe the email must exist?

Re: >HELP< Email spammer failing D:

Posted: Wed Apr 13, 2011 10:38 am
by 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 ;)

Re: >HELP< Email spammer failing D:

Posted: Wed Apr 13, 2011 8:42 pm
by mandai
Actually you would do it this way:
Code: Select all
mail.From = New MailAddress("user@source", "user")

Re: >HELP< Email spammer failing D:

Posted: Wed Apr 20, 2011 6:27 am
by noobcake
~~~~~~~~~~~~~~~~~~~~~~~~~~~~LOCKED~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks guys