The following code works perfectly as it sends information to the receiver's email address from the sender's(username) email address, but the problem i have is i must provide a password in the credentials in order to send the email, if not i would get an error about authentication.
Is there any way i can send an email message from one email address to another one without providing the password and get no errors with authentication????
Dim smtp As SmtpClient
Dim mailMsg As New MailMessage
smtp = New SmtpClient("smtp.gmail.com", 587)
mailMsg = New MailMessage("email@example.com", "firstname.lastname@example.org", "Your enquiry has been confirmed", "Information was successfully sent to email")
smtp.EnableSsl = True
smtp.UseDefaultCredentials = False
smtp.Credentials = New NetworkCredential("email@example.com", "mypassword")