Files
2026-06-18 14:07:09 +02:00

108 lines
4.4 KiB
VB.net

Imports System.ComponentModel
Imports System.Net.Mail
Imports System.Windows.Forms.ComponentModel.Com2Interop
Public Class Form11
Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click, Label6.Click, Label5.Click, Label4.Click, Label3.Click
End Sub
Private Sub Form11_Load(sender As Object, e As EventArgs) Handles MyBase.Load
ComboBox1.SelectedItem = "bug"
ComboBox2.SelectedItem = "Téléchargeur"
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If TextBox1.Text = "" Then
MsgBox("merci d'entrer votre nom", MsgBoxStyle.Exclamation)
Else
If TextBox2.Text = "" Then
MsgBox("merci d'entrer votre prénom", MsgBoxStyle.Exclamation)
Else
If TextBox3.Text = "" Then
MsgBox("merci d'entrer votre mail", MsgBoxStyle.Exclamation)
Else
If TextBox4.Text = "" Then
MsgBox("merci d'entrer l'explication", MsgBoxStyle.Exclamation)
Else
If TextBox3.Text.Contains("@") Then
vérifico()
Else
MsgBox("merci d'entrer l'entertier de votre mail", MsgBoxStyle.Exclamation)
End If
End If
End If
End If
End If
End Sub
Sub vérifico()
Try
If My.Computer.Network.Ping("www.google.fr") = True Then
mail()
Else
MsgBox("vous êtes pas connecter a internet", MsgBoxStyle.Critical)
End If
Catch ex As Exception
MsgBox("vous êtes pas connecter a internet", MsgBoxStyle.Critical)
End Try
End Sub
Sub mail()
Dim nom = "Nom: " & TextBox1.Text & vbNewLine & "prénom: " & TextBox2.Text & vbNewLine & "mail: " & TextBox3.Text & vbNewLine & vbNewLine & "un bug ou modification: " & ComboBox1.SelectedItem & vbNewLine & "type: " & ComboBox2.SelectedItem & vbNewLine & "explication: " & TextBox4.Text & vbNewLine & vbNewLine & "version: " & version & vbNewLine & "OS: " & My.Computer.Info.OSFullName
Dim Message As String = nom
Dim MyMailMessage As New MailMessage()
Dim SMTPServer As New SmtpClient("mail51.lwspanel.com")
MyMailMessage.From = New MailAddress("noreply@extreme-downloaders.fr")
MyMailMessage.To.Add("contact@extreme-downloaders.fr")
MyMailMessage.To.Add("yoannmultigamig@gmail.com")
MyMailMessage.To.Add("adamnoah1511@yahoo.com")
MyMailMessage.Subject = ("bug ou modification")
MyMailMessage.Body = (Message)
SMTPServer.Port = ("587") 'Port
SMTPServer.Credentials = New System.Net.NetworkCredential("noreply@extreme-downloaders.fr", "yR9$sGrjZDwDMdA")
SMTPServer.EnableSsl = True
SMTPServer.Send(MyMailMessage) 'Envoi
mail2()
End Sub
Sub mail2()
Try
Dim nom = "Bonjour," & vbNewLine & TextBox2.Text & " Votre signalement de " & ComboBox1.SelectedItem & " sur le " & ComboBox2.SelectedItem & " a bien êtê transmis a l'équipe de Extrème downloaders" & vbNewLine & vbNewLine & "ceci est un message automatique merci de ne pas répondre."
Dim Message As String = nom
Dim MyMailMessage As New MailMessage()
Dim SMTPServer As New SmtpClient("mail51.lwspanel.com")
MyMailMessage.From = New MailAddress("noreply@extreme-downloaders.fr")
MyMailMessage.To.Add(TextBox3.Text)
MyMailMessage.Subject = ("Votre signalement de " & ComboBox1.SelectedItem & " sur Extrème downloaders")
MyMailMessage.Body = (Message)
SMTPServer.Port = ("587") 'Port
SMTPServer.Credentials = New System.Net.NetworkCredential("noreply@extreme-downloaders.fr", "yR9$sGrjZDwDMdA")
SMTPServer.EnableSsl = True
SMTPServer.Send(MyMailMessage) 'Envoi
MsgBox("Le message a été envoyé", MsgBoxStyle.Information)
Close()
Catch ex As Exception
MsgBox("Le message a été envoyé", MsgBoxStyle.Information)
Close()
End Try
End Sub
Private Sub Form11_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox4.Clear()
End Sub
End Class