• GoDaddy Community
  • VPS & Dedicated Servers
  • VPS & Dedicated Servers

    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 

    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("alert@sdmailboxstore.com", "---password---")
    SmtpServer.Port = 25
    SmtpServer.Host = "mail.sdmailboxstore.com"
    SmtpServer.EnableSsl = False
         Using mail As New MailMessage()
          mail.From = New MailAddress("alert@sdmailboxstore.com", "San Diego Mailbox Store")
          mail.To.Add(Customer)     'example: 2025551234@vtext.com

          mail.Subject = "Alert!"
          mail.Body = Body     '"You have received mail at San Diego Mailbox Store!"