How can I receive Email with Microsoft Azure?
Yes, I know the instruction from Steve Marx:
EmailTheInternet.com: Sending and Receiving Email in Windows Azure
But it does not work, since he recommends two libraries, cses and SharpMimeTools. Both of these libraries use different versions of the library log4net, I can not refer both versions in my project, because of name clash, so in essence the proposed solution does not work.
If there is a trick to make it work - good. If there is a completely different solution, good as well.
You can also receive email in a similar way to sending email in that post without the need for the worker role. Sites like http://cloudmailin.com allow you to receive email directly as an http post and avoid any of the required setup or the need to have to run your own email server.
Although running you own server can have it's advantages it looks like in this case it maybe easier to rely on a third party in the same was as the sending does.
Did you try downloading the full source code available at the bottom of the post by Steve Marx?
You can install SMTP: http://richardprodger.wordpress.com/
Related
I need some advice on how to solve a problem. I have an application that sends out emails to users. Note, I am using Microsoft Exchange as email server. I would like to have a feature where the user can reply to the email sent by the application and the application be able to read the reply and perform certain actions.
For example, the application will send out an email requesting approval for an item. I would like the user to reply the email and say whether or not the item has been approved or rejected. It's a very simple scenario but it captures what I want to do. How can I read emails sent to a particular address in c#?
Reading, parsing and answering emails in code is often very hard piece of machinery. If you are open to suggestions though one of the possible solutions could be a couple of Approve/Reject links in the body of the email which are linking back to your web site and triggering corresponding actions in your approval workflow. Hope it helps!
You can use EWS, see EWS Managed API, EWS, and web services in Exchange. If you are dealing with Office 365 you may also consider using Outlook REST API.
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution. Read more about that in the Considerations for server-side Automation of Office article.
If you use Outlook for sending emails consider using the VotingOptions property of the MailItem class which allows to set a string specifying a delimited string containing the voting options for the mail message. This property uses the character specified in the value name, sList, under HKEY_CURRENT_USER\Control Panel\International in the Windows registry, as the delimiter for multiple voting options. So, in a response you can use the VotingResponse property which returns a string specifying the voting response for the mail message. This property is usually set to one of the delimited values returned by the VotingOptions property on a reply to the original message.
I recently found a .NET tutorial that showed me how to make a simple chat application in Visual studio using the .NET library, signalr.
I have created the application and made a few moderations including some AES encryption. I have then hosted it on Windows Azure as a website.
The chat application works and has been tested, but I don't know how to view the messages sent from one user to the other.
Can someone tell me where I can find these message streams?
Thanks
All messages will go through the SignalR Hub, so you could either use breakpoints/debugging to see what is send (if you are running in your development environment). Otherwise you could use tracing in the Hub to see the messages.
There is a extension to glimpse that you might use (I haven't tested it though): http://www.nuget.org/packages/Glimpse.SignalR
You can get some performance counters using the tools provided by Microsoft.
For what I know there is no way to get all messages send or received from the server. When you need to analyze the communication of specific clients, try to use Wireshark or Microsoft Network Monitor.
You could also write your own message logger that writes them to file.
You can use common methods as Trace.WriteLine to write info to the default listener. Then use a listener to write to file / database.
This source may be useful when learning to analyze messages from a webserver.
Fiddler is the best tool for monitoring web traffic. It's stupid easy to use and has a lot of extended features to help debug server/client applications. Take a look at this page which includes a brief description of using Fiddler with signalr.
Good luck!
I decided to write here, because I have a problem. I would like to get "only" new mail from Exchange Server using WebDav Protocol in C#.
I downloaded "Exchange SDK" from Microsoft website :
http://msdn.microsoft.com/en-us/library/ms878023%28v=exchg.65%29.aspx
There was an article called "Using the Notification Sample Application" which I tried to use. (This SDK use "POLL" Method)
Everything was fine, because I used this code written by Microsoft which shows how to use Notify using WebDav Protocol and use in your application.
When new mail has come, I was able to notify user about this and after that I "Downloaded" or "Retrieved" mails from Exchange Server.
But one thing which strongly frustrating me is that after notified new mail has come, I can only "get" for example : "All mails" from Inbox folder on my Exchange Server, but I would like to be able to "get, retrieve" only "new" mail which came on Exchange Server.
Is it possible to do this ?
I read a lot of articles in internet, and I could not find any satisfy answer for my question.
It would be great if I can read for example "a:href" for new mail.
I would like to get the last unread mail...
Please help me.
Looks like is not easy to work with WebDAV protocol. We had problem with development on Exchange 2003 and at the end decided to buy third party component "WebDAV .NET for Exchange". That makes development easier.
Notifications in WebDAV will not give you HRef, you have to do SEARCH.
I'm having trouble finding a simple sdk to integrate the Notes-Client from within my c# winform app.
Requirements:
In a c# WinForm application I have to sent notifications by email. These emails should be stored in the "Sent"-folder of the end-user's mail-client. People who receive the emails should see that the mail does not come from an application, but someone else s mailbox.
Approach:
Since I need to store the emails within the Sent-folder of the end-user, I thought I should make use of some Notes-api and let the client-application take care of storing and delivering the emails. Alternatively use late binding.
Problem:
I don't have Lotus Notes installed and rather not install it (I can test on a different non-developer machine). Apparently the only way you can get the proper interop-dlls is by downloading and installing the Lotus Notes application.
Questions:
- From what I read I understood there are two interop-dll's: 1 for the server (Domino) and 1 for the client (Notes). The latter only supports the 32-bit version of the client. Is that correct?
- Does anyone have a download-link to the sdk or the dll's that I need?
Actually there are three options: the COM interop from the cleint code, the COM interop from the server code, or the OLE classes from the client code. The latter requires that the Notes client not only be installed, but actually running when your code sends the message, as the OLE calls actually drive the client front-end UI to do the work. You probably don't want that.
However, I think you're still going to be better off dropping your "rather not install it" preference. In addition to the COM Interop layer, you have to have the Notes core DLLs installed on the machine where the code runs, no matter what API you use for Notes/Domino development. That means you must either have a Domino server or a Notes client installed on the box where the code will run. (The only exception is for Java programmers, who can use an API that makes IIOP calls to a remove API that executes on the Domino server.)
Yeah, I know you said you'd do late binding... And theoretically you could avoid installing Notes clode on your development machine as long as it's there on your test machine. But in that case, your test machine is really going to be your development machine for this part of the project. You'll end up debugging and modifying your code there, and you'll do it with no help from the compiler. I don't see the point of losing the compile-time benefits of early binding just to keep Lotus Notes off your machine. It doesn't bite, really ;-)
As for your specific questions, the only client code available is 32-bit, and the core DLLS and COM interfaces come with it. The trial client download is available here. What you really should do, however, is get the free Domino Designer download here, which includes the client code and also includes all of the developer help files and examples. As an alternative, you could install 64-bit Domino server code instead of client code, and the 64-bit COM interfaces do exist -- however they are not supported by IBM and there are some things that don't work.
We have a syncronisation problem and i've been tasked with writing a program in c# that counts the number of mails that have come in per day on a number of mailboxes on an exchange server(2-5)
is this possible?
Yes it is possible, Blackberry Enterprise Server does something similar in order to forward your emails to your blackberry. Basically you need to create a windows service based MAPI client. Whether you SHOULD do this is another matter, it seems like you are trying to fix a systems issue with a nasty hack.
Maybe the simplest solution would be to analyze your smtp logs using Logparser. The linked article refers to Exchange 2007 but this should still apply to Exchange 2010.