|
-
May 26th, 2011, 08:31 PM
#1
Thread Starter
Member
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.
-
May 27th, 2011, 03:11 AM
#2
Re: Program no longer sending mail
-
May 27th, 2011, 11:15 AM
#3
Thread Starter
Member
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.
-
May 27th, 2011, 01:27 PM
#4
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.
-
May 27th, 2011, 02:05 PM
#5
Thread Starter
Member
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.
-
May 27th, 2011, 02:10 PM
#6
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.
-
May 27th, 2011, 02:29 PM
#7
Thread Starter
Member
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
-
May 27th, 2011, 03:23 PM
#8
Re: Program no longer sending mail
So nothing whatsoever to do with the code you posted .
-
May 28th, 2011, 01:08 PM
#9
New Member
Re: Program no longer sending mail
 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
-
Jun 1st, 2011, 01:31 PM
#10
Thread Starter
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|