Not sure if anybody else has witnessed this but evidently Google no longer lets external apps sign in directly to Gmail anymore. I saw a posting that this started late May. I had a windows program I created that creates a pdf and emails to a list of email addresses. The program creates the file but will no longer email. Does anyone know if this can still be done in Gmail by changing some settings? Or can it be done with a Yahoo or Outlook account. Below is the code I had that used to work.
lblStatus.Value = "Sending email"
MailSocket.Address = "smtp.gmail.com"
MailSocket.Port = 587
MailSocket.ConnectionType = SMTPSecureSocket.TLSv1
MailSocket.SMTPConnectionMode = SMTPSecureSocket.ModeSSLTLS
MailSocket.Secure = True
MailSocket.SMTPConnectionMode=1
MailSocket.UserName = my gmail address
MailSocket.Password = my password
email.FromAddress = my gmail address
email.Subject = "Schedule"
email.BodyPlainText = "Attached is the schedule!"
for i = 0 to lstEmailAddress.listcount - 1
email.AddRecipient(lstEmailAddress.list(i))
next
fileemail.LoadFromFile(f)
If fileemail.Name.Right(4) = ".pdf" Then
fileemail.MIMEType = "application/pdf"
End If
email.Attachments.Add(fileemail)
MailSocket.Messages.AddRow(email)
MailSocket.SendMail