Results 1 to 10 of 10

Thread: Program no longer sending mail

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2009
    Posts
    35

    Exclamation Program no longer sending mail

    RESOLVED:
    See post below for answer

    Myself and a colleague have a program called SwiftScreen, its been out for a month now but since May 25th our program is returning an error when they fill out a form that sends us an email (through our application). My best guess is windows recently had an update of somesort but i don't know. Does anyone know a way to send mail, perferably to a gmail account, that still works using Vb.net?

    I really need to fix this problem, im missing out on alot of data.



    Here is the email code i'm using"
    Code:
    Dim message As System.Net.Mail.MailMessage
                Dim smtp As New System.Net.Mail.SmtpClient("smtp.gmail.com")
                Dim fromMailAddress As System.Net.Mail.MailAddress
                Dim toMailAddress As System.Net.Mail.MailAddress
    
                fromMailAddress = New System.Net.Mail.MailAddress("[email protected]")
                toMailAddress = New System.Net.Mail.MailAddress("[email protected]")
    
                message = New System.Net.Mail.MailMessage()
                message.From = toMailAddress
                message.To.Add(fromMailAddress)
                message.Subject = "TestFromVB"
                message.Body = "Test Message"
    
                smtp.Port = 587
                smtp.UseDefaultCredentials = False
                smtp.Credentials = New System.Net.NetworkCredential("[email protected]", "password")
                smtp.DeliveryMethod = Net.Mail.SmtpDeliveryMethod.Network
    
                smtp.Send(message)
    
                MessageBox.Show("sent...")
    I'm using Visual Studio 2008.
    Last edited by stagnit; Jun 1st, 2011 at 01:36 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width