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.
Re: Program no longer sending mail
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.
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.
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.
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.
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
Re: Program no longer sending mail
So nothing whatsoever to do with the code you posted :).
Re: Program no longer sending mail
Quote:
Originally Posted by
stagnit
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
Re: Program no longer sending mail
That would be great! Thanks Brian.