[Question]E-mail(Bug Report)

Posts 16–20 of 20 · Page 2 of 2
HUh. Thats odd. Let me recompile my thoughts =D
Quote Originally Posted by Shocker2010 View Post
[php]Imports System.Net.Mail
Public Class SubmitBug

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

Dim msg As New MailMessage(senderID.Text, recievers.Text, subj.Text, emailbody.Text)
Dim client As New SmtpClient("smtp.gmail.com", 587)
Dim Credentials As New System.Net.NetworkCredential(senderID.Text, pass.Text)


client.Credentials = Credentials

client.EnableSsl = True

client.Send(msg)



MsgBox("Your email has been sent Thank you for taking the Time To Notify me there's a bug | Credits to MJLover For The Source Code For The Submit Bug|.")

Timer1.Stop()
Timer1.Enabled = False
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Start()
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
MsgBox(" Please Visit mpgh.net For The Best VIP Hacks, Pub Hacks + More", MsgBoxStyle******rmation + MsgBoxStyle.OkOnly)
Me.Close()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
System.Diagnostics.Process.Start("http://mpgh.net")
End Sub
Private Sub Label11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label11.Click
Form1.Show()
Me.Hide()
End Sub
Private Sub Subj_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Subj.Click
Subj.Text = ""
End Sub
End Class[/php]
Oh man, u put the main code in Timer. Timer sends an email every second, so this will never end.

Put the main code in a seperate sub;

Here's the modified code:
[php]
Import System.net.mail
Public Class SubmitBug
Sub SendMail()
Dim msg As New MailMessage(senderID.Text, recievers.Text, subj.Text, emailbody.Text)
Dim client As New SmtpClient("smtp.gmail.com", 587)
Dim Credentials As New System.Net.NetworkCredential(senderID.Text, pass.Text)


client.Credentials = Credentials

client.EnableSsl = True

client.Send(msg)



MsgBox("Your email has been sent Thank you for taking the Time To Notify me there's a bug | Credits to MJLover For The Source Code For The Submit Bug|.")
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
SendMail()
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
MsgBox(" Please Visit mpgh.net For The Best VIP Hacks, Pub Hacks + More", MsgBoxStyle******rmation + MsgBoxStyle.OkOnly)
Me.Close()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
System.Diagnostics.Process.Start("http://mpgh.net")
End Sub
Private Sub Label11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label11.Click
Form1.Show()
Me.Hide()
End Sub
Private Sub Subj_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Subj.Click
Subj.Text = ""
End Sub
End Class
[/php]
ohhk thanks MJ solved the problem.
Thats what happen when someone C&P to share and someone C&P to make it work

.
/Solved

/Closed


Posts 16–20 of 20 · Page 2 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us