Click here to Skip to main content
15,566,687 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

From last few weeks I was working on a windows key logger project. I have a feature which will keep sending mails after every minute to user.
It was working fine, suddenly I noticed that my application have stopped sending mails. It will keep on giving error “Failure sending mail”. I am using Gmail.
But if I copy my same code to any other sample application with same settings it will work.

I am kind of no brainer and cannot figure out whats the issue here.

Please help if you know what you are answering.

Thanks
Posted
Updated 6-May-11 0:09am
v2
Comments
Hemant__Sharma 6-May-11 5:08am    
1- did you examine the full stack trace you are getting? did you try finding solution based on error number written?
2- you didn't show code what did you use to send email i.e. object/thrid party tool.
3- "Please help if you know what you are answering" well people here answer that question they read so the better you question is framed and information is provided the better answer you'll get.

Thanks,
Hemant
sunder.tinwar 6-May-11 5:15am    
Hi Hemant,
Thanks but I know some guys just copy paste whole website content into a answer so I wrote the line.
Yes I did examine the stack trace inner exception also. I was showing something else. But the same code is working in other sample application and old builds of my application.
I am not sure but may be antivirus blocking my application silently so I wanted answer some experienced programmer.
Thanks
Hemant__Sharma 6-May-11 5:43am    
hi Sunder,
i know what you meant and I have faced that too but look at the title of your question "sending mails from windows application" what a viewer will assume? the title will attract anyone. i think if it were "Failure sending email in windows appication with gmail" it would be more specific.

next the description says the current code was working earlier and now its not working but its working in some different application. Well that sure says that the problem is not with your code it is something sorrounding your code or application, like you said antivirus. but you've not checked "blocked program list" of your antivirus. That is why you need to give more details about sorrounding.

Well check my suggestion and feel free to comment/reject it but with proper reason.
Thanks,
Hemant
Groulien 6-May-11 5:24am    
GMail might give you a timeout because, like you said, it's sending 1 mail per minute and is afraid of spam.
sunder.tinwar 6-May-11 5:37am    
I dont think that is the issue. Because the same application is not working for any email id but same code is working for different application for any ID.

1 solution

if you think it is any antivirus or firewall software blocking requests of your appication

1- check their "blocked program list"
2- you can install Fiddler its free and will show your whatever is being requested from your system, below is the link
http://www.fiddler2.com/fiddler2/[^]

if fiddler is showing you a request being made from your appication to gmail then no software is blocking the request. sorry that was my assumption as i'm not sure the sequence of software will come into the picture. but you can keep it as alternate that your software is making a request. if it is showing your request i think its Gmail and like @nbgangsta said can result in spam. and in that case you can take support from gmail team.

Thanks,
hemant
 
Share this answer
 
v2
Comments
sunder.tinwar 6-May-11 6:13am    
But the same code should not be supposed to work with sample code right.
Hemant__Sharma 6-May-11 6:30am    
if the sample code is hitting gmail with the same rate.. then yes it should not be supposed to work.
Hemant__Sharma 6-May-11 6:32am    
you can also analyze the code difference between the old build in which the code is working and the current code its not working.
sunder.tinwar 6-May-11 6:32am    
Then whats the issue with main application using same code. Even if I hard code values it will not work. I am no brainer.
sunder.tinwar 6-May-11 6:33am    
I copied pasted same code from main application and created a sample application. There it worked. So where I have confusion.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900