trying to send emails to customers when they receive packages and postal mail
I've written a Visual basic program to send out alerts to my customers when they receive either a package or postal mail to their mailbox in my store. The relevant code is below, but it just errors out after thirty seconds or so. Any help would be appreciated!
Dim SmtpServer As New SmtpClient() SmtpServer.Credentials = New Net.NetworkCredential("email@example.com", "---password---") SmtpServer.Port = 25 SmtpServer.Host = "mail.sdmailboxstore.com" SmtpServer.EnableSsl = False Using mail As New MailMessage() mail.From = New MailAddress("firstname.lastname@example.org", "San Diego Mailbox Store") mail.To.Add(Customer) 'example: email@example.com
mail.Subject = "Alert!" mail.Body = Body '"You have received mail at San Diego Mailbox Store!" SmtpServer.Send(mail)