Click here to Skip to main content
14,669,678 members
Rate this:
Please Sign up or sign in to vote.
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 5-May-11 23:09pm
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

Rate this:
Please Sign up or sign in to vote.

Solution 1

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
   
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.
Hemant__Sharma 6-May-11 9:07am
   
Got it buddy but did you get a chance to try with fiddler? if yes did you see any request being made to fiddler from your application?
sunder.tinwar 9-May-11 8:08am
   
hi...yes i installed fiddler and it was sending request. but still mail sending failed. for same code if i use in sample application it was sending request and mail send successfully.
I could not figure out whats the issue here.
Hemant__Sharma 11-May-11 3:25am
   
hello sunder.
can you send me the fiddler traces of both successful and unsuccessful transaction.
you can save the sessions from Fiddler > File > Save > All Sessions
i'll try to compare what are you getting in both web requests. you can check for the sensitive information like password. you can examine the request with Inspector (right page second tab) in that there are lots of tab you can click on text/xml to see if there is any password parameter being passed if not you can send me the saved session. you can also use a dummy gmail account if you have any.

usually in fiddler, if you receive a failure the web request become RED and if successful you get 200 as success confirm that also.

Regards,
Hemant

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100