Já nevím jak to udělat.
Dvě textové pole
Do Prvního se napíše email od koho to je
Do Druhého se napíše zpráva,text.
Pokaždé tam bude napsane něco jiného jiný email a text.
Imports System.Net.Mail
Public Class Form1
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'poílaní
Dim MyMailMessage As New MailMessage()
Try
MyMailMessage.From = New MailAddress("xxx@gmail.com")
MyMailMessage.To.Add("xxx@gmail.com")
MyMailMessage.Subject = TextBox1.Text
MyMailMessage.Body = TextBox2.Text
Dim SMTP As New SmtpClient("smtp.gmail.com")
SMTP.Port = 587
SMTP.EnableSsl = True
SMTP.Credentials = New System.Net.NetworkCredential("xxx@gmail.com","xxx" )
SMTP.Send(MyMailMessage)
TextBox2.Text = ""
Catch ex As Exception
End Try
End Sub