Hello, I have coded a button to send an email by gmail, the code searches in a specific table on the database and take the email credentials from there to after that send the email...
Here's the code:
Try
Dim Mail As New MailMessage
Dim SMTP As New SmtpClient("smtp.gmail.com")
Mail.From = New MailAddress(Txtemailcontacto.Text)
Try
Dim cmd As New SqlCommand("SELECT email, password FROM emailcontact WHERE codemail = '1'", conn)
conn.Open()
& ...
Go to the complete details ...