|
Only by processing the mailbox that you marked the message as being From. SMTP is a store-and-forward protocol - you don't necessarily (or typically) get a direct connection to the destination server that holds the end-user's mailbox, and even if you did it doesn't have to tell you honestly whether it's stored the message.
Exchange Server in its default configuration accepts all messages at an SMTP conversation level, and places them in an 'incoming messages' queue. Only then does it perform directory lookups to find out if it has a mailbox for this message and if so, store the message. If it doesn't, it instead generates a 'non-delivered report' which is then sent to the sender of the message.
|
|
|
|
|
Ok, i hope i understand what you meant
The server that doesn't find a the recipient for an email that sends a 'non-delivered report' back to me; is there a way in System.Net.Mail to catch this message as a notification for me?
Thanks!
|
|
|
|
|
Hi *.*,
I need to dynamically create a printer port (LPR port) and set that port to a existant printer. Actually there is another little 'problem': The LPR port might not be available on that system, but I still need a remote program (controlled via ActiveX) to print via LPR from any system to my own process, like a lokal loopback printer.
I cannot print to file on any local or remote filesystem due to security restrictions, but I am able to open a port to receive the printing filestream.
What is the correct approach to do this?
Or, second option: What do I have to do if I want to simulate a network printer, i.e. saying let the application print to a network printer on IP '127.0.0.1' and listen on port 9100 to get the data. What protocol do I have to implement (need real good documentation) or, yet better: is there already a reference implementation?
--
Do you have the right problem for my solutions?
|
|
|
|
|
Hello...
I have a server using TcpListener. Then I have also client using TcpClient.
The problem is : If I unplugged the network cable from server, then I try to send data from client to server, my TcpClient said "it is ok". But physically there is no connection between client and server.
My client said "it is NOT ok" only if I close all the connection in server (NetworkStream, TcpClient, and TcpListener). Otherwise is OK.
How can I solve the problem ?
Thanks...
|
|
|
|
|
There will always be buffering between client and server. TCP sends retries repeatedly until the Maximum Segment Lifetime (MSL, about two minutes typically) is exceeded or until the far end replies with an ACK (to accept the data) or a RST (reset) packet, indicating that the listening program isn't responding. If MSL is exceeded, or RST is sent, you'll get an error when you try to send data.
If you close the connection on the server side, the server's TCP stack will send a RST in response to unexpected data from the client because it no longer has a socket to deliver the data to.
You can't do anything about this - it's just how TCP works.
|
|
|
|
|
i have to use the same port for receiving and transmitting. i have two threads running. how do i control them meaning how is suspending thread of VC applied here in C#?
|
|
|
|
|
Thread.Sleep will suspend the current thread.
|
|
|
|
|
Hello,
i have started a c# project in Visual Studio 2003 on a PC running Win2000. Now i have moved the project to a Win XP machine and use Visual Studio 2005 to continue. The problem is although the designer shows all the controls placed on the form (buttons, numericUpDown and so on) in the new XP style, the runnig programm still uses the style of windows 2000. Is there anywhere a setting that makes my programm look like a normal XP Application.
|
|
|
|
|
Add a call to Application.EnableVisualStyles in your main method:
static void Main()
{
Application.EnableVisualStyles();
Application.Run(new Form1());
}
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi,
I have a form that has several tab pages on a tabcontrol.
What I want to do is make sure that the user cannot tab/navigate to another tabpage whilst they are editing data on that tab page.
psuedo code:
EditButton_click event<br />
{<br />
this.tabpage1.locked = true;<br />
}<br />
<br />
SaveButton_click<br />
{<br />
this.tabpage1.locked = false;<br />
}
Any ideas.
TIA
Glen Harvy
|
|
|
|
|
Since Framework 2.0 the TabControl has a Selecting event that occurs before a tab page is selected and can be aborted. So you could set a boolean field inside the both click event handlers and inside selecting event handler abort the selection or not depending on the current value of the field.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thanks for pointing me in the right direction. I ended up with the following:
AddButton_click<br />
{<br />
this.tabControl1.Selecting += tabControl1_Selecting;<br />
}<br />
<br />
private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e)<br />
{<br />
MessageBox.Show("Please Cancel or Save your changes before going any further.", "Action required", MessageBoxButtons.OK, MessageBoxIcon.Question);<br />
this.tabControl1.Selecting -= tabControl1_Selecting;
tabControl1.SelectedIndex = 2; <-- I'll code this to refer to the appropriate calling tab page index.<br />
this.tabControl1.Selecting += tabControl1_Selecting; // in case the user didn't get the message the first time :)<br />
}
Thanks for being there - I don't know what I would do without this forum.
Regards,
Glen Harvy
|
|
|
|
|
The Selecting event lets you abort the selection of a tab page in a much nicer way:
private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e)
{
MessageBox.Show("Please Cancel or Save your changes before going any further.", "Action required", MessageBoxButtons.OK, MessageBoxIcon.Question);
e.Cancel = true;
}
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Makes sense to me now thank you
Glen Harvy
|
|
|
|
|
Hello Friends,
I want the name of process and username under which it is running.
Like wise in taskmanager ImageName and UserName.
Thanks in advance.
Rahul Kulkarni.
|
|
|
|
|
Hello,
What do you have or what do you know about the process?
All the best,
Martin
-- modified at 5:29 Thursday 22nd February, 2007
System.Diagnostics.Process class has a lot of usefull methods!
|
|
|
|
|
I know all using for loop we can get all the processes
running in the task manager in the following manner.
foreach(Process prc in Process.GetProcesses())
{
////We can get all information like id of process etc.
}
But i want the "username" also under which the process is running.
how to get user name.
Rahul Kulkarni
|
|
|
|
|
I have no idea how you can do this.
Good luck
|
|
|
|
|
|
Thanks Alooot.
It's Really cool.
Rahul Kulkarni
|
|
|
|
|
hi
how can i make the new form appear in the center of the window?
i double click on the previous form opens this new one.
|
|
|
|
|
Hello,
Forms property "StartPosition" will help you.
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
All the best,
Martin
|
|
|
|
|
thank you so much.
one more thing.
on executing my application, when i try to resize the form, ie, by dragging or using the maximise button, it gets resized but the controls dont get done. they are at the same position as of the original form.
how do i resolve this?
|
|
|
|
|
Hello,
Use the Anchor or Dock property of the controls.
All the best,
Martin
|
|
|
|
|
thank you. i could do it by setting the Dock property.
|
|
|
|