Opening mail.box file in Domino Server - c#

I want to programmatically access Mail.box file in Domino Server.
Using C#.
Before opening it i was to see it's contents.
My question is that how can we open file with .box extension?
Especially Mail.box file in Domino Server.

Not sure I understand you fully. Are you saying that code like this doesn't work when attempting to access the mailbox on the server?
Domino.NotesDatabase database = session.GetDatabase("", "mail.box", false);

Mail.box is in fact a notes database. So opening it like a normal database is possible. However this is managed exclusively by the server. Email messages appear in this database only momentarily. Literally for a second. The only messages you will be able to monitor are emails the SMTP process cannot send.
If this is your intention, I would suggest consulting a Notes Admin as I think you can configure the server to alert you in the case of "dead" emails.

Related

Open New Outlook email window on clinet machine

I have a C# MVC application. I am using Outlook Interlop to create and open new mail through the application with contents and attachments pre-populated.
I get the desired functionality when I run the application locally on my development machine.
When I deploy the same application to server (2012 R2), the outlook new email window does not open on the client side.
Is is possible to open new outlook email window on client machine with the interlop code running on server. (Every user of the application has Outlook installed on their machine).
I have just installed Outlook 2013 on the server. Is there anything else I need to do on the server to make this work.
Any help would be appreciated as I have been struggling a lot to make this work.
Are there any alternative solutions to achieve the same?
Thanks in advance.
No, firstly, Outlook cannot run in a service such as IIS.
Even if it could, it would still be displayed on the server side.
You can dynamically generate an EML (MIME) message on the server. When the user on the client side downloads it, Outlook will display it. If you want the message to be displayed unsent, make sure you include X-Unsent MIME header (set its value to 1).
Code running on the server makes stuff happen on the server. It works on your dev machine because it's both client and server, it won't work on other people's machines. In addition to that, I believe the Office Interop stuff specifically says it's not for use on a server (for both technical and legal reasons).
If you want to pop up a message pre-populated with some values on a client machine, you do have the option of the mailto link, but I believe it is only plain text with no attachments.

Simulate a network share in order to share files

Often times a program requires a file that happens to be on a network location. Take for instance Outlook. If I where to place an outlooks database (.pst file) in a network location then windows will make that "transparent" to the user and outlook will still be able to work. Another example could be quickbooks and many more. (as long as you have permissions to write and read)
For this example let's use Microsoft Word. If I would want to open a file in some other computer in the network I would be able to navigate to it as:
and open the file that I want because we are on the same network.
Now my question is how will I be able to simulate that? I want to have a virtual directory on the internet where I can place lets say my .pst file and then select it from windows explorer as:
(this example obviously does not work)
Will it be possible to do that? I believe windows uses a tcp connection with the host computer and then the host responds with he files that it shares. I will like to implement a program that does that so that I could avoid having to create a vpn. Also it will be nice if I could have my pst (outlook database file) on the internet so that all my computers open the same outlook database.
Note my purpose of this question is to open an outlook database file on a network location. I will like to be able to select a file on the internet from windows open file dialog. Also in todays world everything pretty much exists. I will like to create it lol
Windows provides a network redirector for CIFS (Common Internet File System, formerly SMB Server Message Block) resources. Writing a CIFS server is the easiest approach.
But you can also use one of the other existing redirectors, such as NFS, WebDAV, or Netware. And it's also possible to write new redirectors (though that requires kernel mode code, there are some development kits that provide the kernel code for you, similar to a Linux FUSE filesystem).
If you want to avoid writing code, WebDAV over HTTPS will provide you secure access (no need for a VPN layer) and software already exists.
It depends on how the server on the internet is set up to make its files available. Most often tcpip is not the protocol used for this - it is FTP, SFTP, HTTP or something similar. I believe Windows Explorer uses RPC calls over a local network to accomplish this. I don't think you will be able to use the Open File Dialog, you will have to write something similar that works over the protocol you need to use.

Accessing Domino mails in asp.net/C3 without installing Lotus Notes Client

I have a windows service written in .NET/C# which reads emails from a Domino mailbox. Currently I am using the Lotus Notes .NET Interop to achieve this. However for this the Lotus Notes Client needs to be installed on the server. I am trying to find a way in which I can achieve this without having to install the Lotus Client on the server. From whatever I have read, I did not find anything.
Proposion N2N is an ADO.NET provider for Domino, but even that needs the client to be installed on the server.
Is there a solution available for this?
In a word, no.
You don't need all of the Notes client (or Domino server) install to get to the data, but you do need a significant part of it (and an ID that has access). Even if you take nothing else into account at all, you'd need a "driver" that recognises and can read all of the various ODS (on-disk structure) versions your database might be in, and it has to be able to handle both stored MIME and Notes Rich Text composite data structures with LMBCS (Lotus Multibyte Character Strings). Neither of those tasks is trivial. Then there's the security to get around: most document data are not stored in the clear even if the database is not locally encrypted (which only prevents unauthorized access from within a Notes/Domino environment if the ID for which it has been encrypted has not been compromised) and the storage method is not published.
In other words, you'd need something that is most of Notes in order to read and/or write, and the easiest way to get most of Notes is to install Notes.

saving a text file in client side without asking for permission any time

I need to save a text file on the client side possibly without permission. The case is that I need to save this text file in a shared folder in this or in another machine in the lan. This text file is going to be read automatically by the fiscal printer which will print the fiscal invoice. I have a asp .net web application and the server is not on the same lan with the fiscal printer, so I have to write it on the client-side. Any idea how to do this without asking to the user every time for the security issue.
I need a cross browser solution.
I can accept a solution like, the client is asked only one time a the first printing, but not every time he wants to print a bill. Some kind of asking permission to the client for allowing this website, in order to not repeat the permission asking.
Obviously - this would be a major security breach to download files to the user's computer without them knowing. All browsers have precautions in place to prevent this from happening.
No, you can not do this. Saving a file to a computer without permission in a public folder is not allowed.
You can, however, have your Client install your application which will have the ability to read and write where you want.
A common way that Trojan viruses to this is by giving the Client some goofy program to run that displays a fireworks show or something else quite trivial. While the Client is busy wondering what he's looking at, your virus is installing quietly in the background.
Now, you are probably saying to yourself, "But I am not installing a virus." However, there is no way for a Browser to know if your application is a virus or not. That is why it is not allowed and why you can not do it.
The more applicable scenario for me is:
1- Do your work inside your web application.
2- Get the information that you need to print.
3- Send it to another computer directly (or to a hosted web service) and this computer will act as a host for these files.
4- let your server access this shared folder, and print what you want
You could use a cookie, which won't ask permission. Of course that would only work when cookies are enabled and can store limited amounts of data.

C# / Exchange EMail Client

I need to create a very simple c# Windows Service to listen for, and process email wth special subject lines. I already have the code that process these emails working well. For ease of development, I just packaged the code in an "Outlook Addin" on my own machine, running under my own email account. Works great.
Now that it's working, I need to move this to the server. I have a special email account setup on the Exchange Server for this purpose. I really don't want Outlook running on the server. Is there some other way to login to this email account and listen for email from my Windows Service without using the Outlook client?
Thanks!
It sounds like your code is closely tied to Outlook, so you may have to change your approach for the server. I faced exactly the same problem last year and considered the following options :
CDO (not supported by Microsoft with .NET due to some strangeness when running in process)
WebDAV for Exchange 2003
Web Services for Exchange 2007 (great example in the link)
You also need to ask yourself - do you actually need your program to check the mail server? I couldnt use any of the above options so ended up having one of the mail admins set up an exchange rule that dropped the emails/attachments into a special folder on the server. I could then process the files at my leisure. Worked extremely well and much easier to maintain than directly interrogating the mail server through code.
If your exchange admin has enabled it you can use IMAP or POP3 to connect to the server.
You can also use MAPI to connect as well.
You can find a number of libraries (free and otherwise) for doing all three.
I have had good experience with MailBee IMAP but there are definitely free alternatives if you only need to do some simple functionality.

Categories