Results 1 to 10 of 10

Thread: Program no longer sending mail

  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.

  2. #2
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: Program no longer sending mail

    Well, what is the error.

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2009
    Posts
    35

    Re: Program no longer sending mail

    403 forbidden.....the form that sends mail to my own @mysite.net address also quit working the same time gmail did.

  4. #4
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: Program no longer sending mail

    So you are saying that the gmail account itself is not working? ie your account has been disabled?

    So likely there is nothing wrong with your code at all. The site has either been blocked the network admins, or the site is blocking you itself.

  5. #5

    Thread Starter
    Member
    Join Date
    Apr 2009
    Posts
    35

    Re: Program no longer sending mail

    it can't be that because gmail does allow it and my account is still good, keep in mind it wont send mail to my own email address either, the address i own the domain to.

  6. #6
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: Program no longer sending mail

    I know gmail allows it, your program used to work and I even gave you a link which tells you the settings. You say you account is good, does that mean you can log into the account correctly through the website? Does that mean you have tested the application on your own machine, which you also tested the website on? Have you tried this from multiple places? Do all work, all fail or random?

    If so, then the website and its hosting is working correctly for your count, which is one of the two possible answers I gave.
    That would lead to the other answer, is that the machine that is trying to send mail, is being blocked the network admin or possible by gmail themselves believing that the site sending it spamming.
    Last edited by Grimfort; May 27th, 2011 at 02:14 PM.

  7. #7

    Thread Starter
    Member
    Join Date
    Apr 2009
    Posts
    35

    Re: Program no longer sending mail

    Ok i fixed my problem, here is what happened. I was using this function to return an the IP address of the computer (so we would know if different forms were from different people)

    Code:
    Private Function GetMyIP() As Net.IPAddress
            Using wc As New Net.WebClient
                Return Net.IPAddress.Parse(Encoding.ASCII.GetString(wc.DownloadData("http://whatismyip.com/automation/n09230945.asp")))
            End Using
        End Function

    the link that we used to return the IP address changed to
    http://automation.whatismyip.com/n09230945.asp

  8. #8
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: Program no longer sending mail

    So nothing whatsoever to do with the code you posted .

  9. #9
    New Member
    Join Date
    May 2011
    Posts
    1

    Re: Program no longer sending mail

    Quote Originally Posted by stagnit View Post
    Ok i fixed my problem, here is what happened. I was using this function to return an the IP address of the computer (so we would know if different forms were from different people)

    Code:
    Private Function GetMyIP() As Net.IPAddress
            Using wc As New Net.WebClient
                Return Net.IPAddress.Parse(Encoding.ASCII.GetString(wc.DownloadData("http://whatismyip.com/automation/n09230945.asp")))
            End Using
        End Function

    the link that we used to return the IP address changed to
    http://automation.whatismyip.com/n09230945.asp
    Stagnit....please email me and we'll get you a custom file for your program...so we won't break it again in the future. Anyone else that's written software that uses our automation, please ask them to contact me as we'll get them their own custom file as well.

    Thanks,
    Brian
    brian at whatismyip dot com

  10. #10

    Thread Starter
    Member
    Join Date
    Apr 2009
    Posts
    35

    Re: Program no longer sending mail

    That would be great! Thanks Brian.

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