Does anybody know if it is possible to download email messages and send something to the email server to delete an email from the server using ASP.NET?
I have developed a program to download email information from my email server, but I can't figure out how to send something to the server to delete an email. I developed what I have using the resources at this location:
I am sick and tired of all the junk mail I am getting and want to write my own program to delete emails from my email server based on criteria I create.
I have VB 3.0, VS 6.0, VS.NET 2003, VS.NET 2005, VS.NET 2008 and VS.NET 2010 Express. I have developed web sites and standalone programs using VB and ASP.NET. My experience and knowledge is not extensive, but i do have enough knowledge to create a VB program.
I tried that. I'm getting an error and don't know what to do about it. I don't expect you to know either since it looks like an error specific to IPWorks.
It is blowing up on line 212. Here is the error:
================================================================
Server Error in '/MailMonitor' Application.
--------------------------------------------------------------------------------
Missing key column [messageid] needed to create command.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: nsoftware.IPWorks.DataProvider.IPWorksException: Missing key column [messageid] needed to create command.
Source Error:
Line 211: ipworksCommand1.CommandText = "DELETE from INBOX WHERE messageid='" + messageIDBoundField + "'"
Line 212: ipworksCommand1.Connection = ipworksConnection1
Line 213: ipworksDataAdapter1.DeleteCommand = ipworksCommand1
Line 214:
================================================================
TGirgenti
Member
129 Points
165 Posts
How to delete email from email server
Jun 25, 2010 01:28 PM|LINK
Hello.
Does anybody know if it is possible to download email messages and send something to the email server to delete an email from the server using ASP.NET?
I have developed a program to download email information from my email server, but I can't figure out how to send something to the server to delete an email. I developed what I have using the resources at this location:
http://msdn.microsoft.com/en-us/beginner/dd571511.aspx
I am sick and tired of all the junk mail I am getting and want to write my own program to delete emails from my email server based on criteria I create.
I have VB 3.0, VS 6.0, VS.NET 2003, VS.NET 2005, VS.NET 2008 and VS.NET 2010 Express. I have developed web sites and standalone programs using VB and ASP.NET. My experience and knowledge is not extensive, but i do have enough knowledge to create a VB program.
Any help would be gratefully appreciated.
Thanks,
Tony
Deeshal
Contributor
2081 Points
418 Posts
Re: How to delete email from email server
Jun 25, 2010 05:31 PM|LINK
It says that DELETE commands work as well. Do you know a bit of SQL?
TGirgenti
Member
129 Points
165 Posts
Re: How to delete email from email server
Jun 30, 2010 05:12 PM|LINK
Hello Deeshal.
I tried that. I'm getting an error and don't know what to do about it. I don't expect you to know either since it looks like an error specific to IPWorks.
It is blowing up on line 212. Here is the error:
================================================================
Server Error in '/MailMonitor' Application.
--------------------------------------------------------------------------------
Missing key column [messageid] needed to create command.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: nsoftware.IPWorks.DataProvider.IPWorksException: Missing key column [messageid] needed to create command.
Source Error:
Line 211: ipworksCommand1.CommandText = "DELETE from INBOX WHERE messageid='" + messageIDBoundField + "'"
Line 212: ipworksCommand1.Connection = ipworksConnection1
Line 213: ipworksDataAdapter1.DeleteCommand = ipworksCommand1
Line 214:
================================================================
Here is the code i use to get the messages:
<div style="BACKGROUND-COLOR: white; COLOR: black" mce_style="BACKGROUND-COLOR: white; COLOR: black"> </div>I have included my code after it has already filled a gridview with the messages from the email server. I'm trying to delete checked messages.
<div style="BACKGROUND-COLOR: white; COLOR: black" mce_style="BACKGROUND-COLOR: white; COLOR: black"> </div>Thanks for your help.
Tony