|
would you help me by C# code
thanks
|
|
|
|
|
yes of course, just send the code and the question.
|
|
|
|
|
//my method it works but mail is not deleted
Spartan.Net.Mail.POP3 objPOP = new Spartan.Net.Mail.POP3();
objPOP.Connect(Properties.Settings.Default.POP3Server, Properties.Settings.Default.POP3Port, frmLogin._currentUser.fldUserEmail, password);
try
{
objPOP.DeleteMessage(_ReceiveMailNumber);
return true;
}
catch(Exception ex)
{
XtraMessageBox.Show(ex.Message.ToString());
return false;
}
//connection code
public MAIL_ERROR Connect(string host, int port, string username, string password)
{
try
{
_conn.Host = host;
_conn.Port = port;
_conn.Connect();
System.Threading.Thread.Sleep(_TimeOut);
return Login(username, password);
}
catch (Exception e)
{
System.Diagnostics.Trace.Write(e.ToString());
return MAIL_ERROR.ERROR_CANTCONNECT;
}
}
//i send mail receive number
public MAIL_ERROR DeleteMessage(int id)
{
if (this._state != POP3_STATE.POP3_LOGGEDIN)
{
throw new MailException("You are not logged into the mail server");
}
string ret = "";
SendCommandSynchronous(string.Format("DELE {0}\r\n", id), out ret, false);
if (ret.Contains("OK") == false)
{
throw new MailException(ret);
}
else
{
return MAIL_ERROR.ERROR_NONE;
}
}
private MAIL_ERROR SendCommandSynchronous(string cmd, out string response, bool bMultiLineResponse)
{
// Remove any data that was left over on the buffer
string deadData = _conn.Receive();
_conn.Send(cmd);
response = WaitForResponse(bMultiLineResponse);
return MAIL_ERROR.ERROR_NONE;
}
private string WaitForResponse(bool bMultiLine)
{
int timeout = 5000; // wait 10 seconds for response
int waitedTime = 0;
string strRet = "";
while (waitedTime < timeout)
{
System.Threading.Thread.Sleep(_TimeOut);
strRet += _conn.Receive();
if (CommandComplete(strRet, bMultiLine) == true)
{
return strRet;
}
waitedTime += _TimeOut;
}
return strRet;
}
|
|
|
|
|
What he's saying is, do your own work. He's told you how it's done, if you can't even try to do it based on this, then you should consider doing a programming course, so you can one day hope to be a programmer.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hi cristian graus,
its really very good news that u r only programmer in the world who's programming knowledge is like God. u can tell u as second god.
Shafik
|
|
|
|
|
khosnur wrote: its really very good news that u r only programmer in the world who's programming knowledge is like God. u can tell u as second god.
Well, I can program, AND I can spell. I can even use google. If I ask for help, I tend to first try to think for myself and ask questions where I tell people what I've tried instead of asking them to send me code. This does not make me 'god', but I guess it does make me working for a real wage in the real world, instead of being hired because I am cheap, by people who don't realise I am not worth it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Graus,
i think u dont see that i thought and i up;oad my code but it doesnt work. why i dont know would u see....
then complement....
Shafik
|
|
|
|
|
It looks to me like you're using some sort of third party library. What error you get, is still a mystery. No-one can help based on that lack of information.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Graus,
i supply the mail receive number which i got when i received mail.interesting it shows no error when i debug. but mail is not deleted.
would u help me by any ires
thanks in advance
|
|
|
|
|
motherchod reply des na ken?
|
|
|
|
|
Please read the sticky at the top of the thread "How to get an answer to your question". So far you have broken rules: 2, 4, 7 8 pretty close to breaking 11 and also the unwritten rule about not using textspeak in message boards.
99.9% of the people on the message boards are unpaid and helping as an act of altruism. We are not here to supply you with code, just helping to provide guidance. You should ask a specific question or ask about a specific fault, otherwise you aren't going to get a better answer than the ones you have.
|
|
|
|
|
please dont misunderstand me. i upload my code. but grause complement me without see that code.its really unwanted.
thanks
|
|
|
|
|
Hi,
I need information from the hardware of the system.( for example the CPU temperature.)
Anybody know how to get it?
|
|
|
|
|
|
The replies here are all "It doesn't work" - the reason why is described here[^]
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
The chances are you can't, unless the CPU motherboard manufacturer has provided the info via WMI, which is unlikely - most don't so there is no simple, generic way to do it.
If you aren't after a generic solution, then you will have to look at the manufacturer of your specific hardware for details (if they give them!)
[edit]Monday morning disease - replace CPU with motherboard. Ooops![/edit]
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
modified on Monday, September 7, 2009 5:17 AM
|
|
|
|
|
Hi Experts
How To Insert hyperlink inside the rich text box and handle the event
of that hyperlink to open new page using C#.NET 2005
|
|
|
|
|
Add a richTextBox to your form. Property DetectUrls must be true. Then attach to event "LinkClicked".
private void richTextBox_LinkClicked(object sender, LinkClickedEventArgs e)
{
Process.Start(e.LinkText);
}
|
|
|
|
|
i have a master page called master.master
and a page in a folder "MyFolder"
when i'm trying to create a webform page in that folder that inherits the master.master page it doesn't inherit anything and no errors appears
when i put the master page and the webform in the root directory it works !!
what is the problem??
thanks in advance
|
|
|
|
|
The main issue is that you're not asking in the ASP.NET forum.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi Im Arnel.... Im New about Mobile application and i want to make an apllication that could send an SMS to other phone.. what are the dlls
that i need or what classes do i need from .net compact framework..??
|
|
|
|
|
|
Hi all
How can i use loop to read all files in my program? this is a phonebook program that information save in 26 files and filename start with a.txt until z.txt) can anyone help me?
|
|
|
|
|
Well, there's all sorts of ways to do this. Why would you store your data that way ? What code have you written to read your files ? What point are you stuck on ?
Really, I think your program has overall design issues that would not be solved, even if it was clear what point you're stuck with here. Any sort of loop that turns numbers into letters is nastiness, so I wouldn't use a loop to generate filenames to start with.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
First excuse me for my bad english writing.
I am new in c# and i know there are better ways to sort but my teacher wanted me to store data this way.
I want to read all files for searching.
|
|
|
|