I am creating a windows 8 app to send mail from the entered fields. There are two approaches that i have tested and tried. But each one has its own limitation. My requirement is simple to send mail via outlook desktop app for the user. The content body of the mail is well formatted hence I used HTML to create it(Other ways if any let me know), there is an image attachment also of the InkManager used to take user sign.
Approach 1: Use share charm. All things work well but some times the app stops sharing then I need to restart or logoff from that account and then again login. And the clients wants to open his/ her outlook
Approach 2: Use mailto and open using Launcher.LaunchUriAsync it gives me an option to choose outlook but I can't set the HTML content formatted and unable to put the InkManager used to take user sign as an image
How can I solve this issue?
If you need to send the mail from the user's account these are the only two ways. Alternatives are using an external web service as Filip suggested or sending it directly from the app using a mail API such as Mail for Windows Store.
I have another remark regarding the first approach, though. In my experience the sharing typically stops working until the next logon when an app does something wrong handling the DataRequested event - this breaks the share charm for all the apps. If it happens to you during development or testing your own app, make sure you handle any exceptions that might happen in the event handler and also check that you are adding and removing the event handler properly. Also avoid stopping the app within this event handler when debugging. This should prevent the issue from occuring.
The best way right now is to write/connect to a web service that sends the mail. I think there might be existing ones out there.
Related
In my ASP.net MVC4 project users can send messages to admin. Admin can check that messages in any time in a special section of his page without any problem. I am little bit confused with next thing: For my thinking it will be better to make a notification in webpage of admin which will mean that he have a new messages from users instead of сhecking that section everytime. What the best way to realise it (to show a notification)?!
I would implement Signal-R for that purpose. When the server finds a new message waiting for the admin, it would send a notification to your app, and you then just need to show a toast with a link to your existing page for instance...
You can find more info about this technology here: http://www.asp.net/signalr
Example of toast library: https://codeseven.github.io/toastr/
I had to change the email addresses that are involved in an app to a different set. The app just sends notifications when a form is submitted to the user and the admin for a confirmation. I went into the app files and did nothing but switch out the email address in the mailer.cs file. It doesn't seem to be effecting anything and it's still going to the old email and using the old email when sent to the user. Do I need to do more than that? This is an old app and I'm actually in the process of creating an updated replacement in a back-burning project, I'm not quite familiar with the detailed workings of it. I am manually editing these files and not using the UI if that makes any difference.
Is it a web application project? If so you need to build it through visual studio.
If it was created as a website project then try touching the web.config (like putting in a space or a line break anywhere and hit save) so it may try to re-compile.
I am trying to make a program that will listen to if I recieve a E-mail I got a smtp server and so on.
I want to make a database object with Title and text from the Mail and I might want to evolve it into also saving the attacted file to the database so I can use it it my asp.net program.
I think I need a windows Service that will be listening to the email if it gets a email it will add it to datbase and wait again but I am not sure how to do that. if its possible to program that into my asp.net project then it would be a good thing also
Here is a small design on how I was thinking about it
if you know anything about it feel free to come up with any kind of solutions for me.
Read incoming emails with POP3 or Exchange. I've made something similar before, which was a system where users could add links (a type of linking-scam actually) to different websites. So there was a bunch of people in Asia that had a full-time job searching for relevant sites and emailing a list of these URL's to a specific email-address. A service I had running would check the POP3 inbox every 5 minutes or so and then post these links to the website.
You should make an application that gets run at specific intervals rather than a service, which is much simpler. If you're using Azure as a host you can use the scheduled task service there to make a POST call to a page on your site so you don't have to run the code in a different eco-system. Well, I guess you can do that anyway with scheduled tasks in windows.
Here's a POP3 client for .NET
You could make a C# service that checks the pop3 server in a configured interval, and store them in the DB. There's something like this here:
http://aspsnippets.com/Articles/Fetch-and-Read-emails-from-POP3-mail-server-using-C-and-VB.Net---Part-I.aspx
But as a regular application, you just have to make it to run as service (I think you have a project template for that in VS). You have some info here:
http://msdn.microsoft.com/en-us/library/zt39148a(v=vs.110).aspx
Okay I figured out a good solution for this problem friends :)
What I did was I downloaded the EAGetMail and implamentet it. it basicly works for you in a time interval it will check your mail and make a txt file with all the mails so it wont read it again. it also got a aplication field so everytime it runs it will run the selected application.
So I made a console application that runs trough my folder where it will save all my email's as .eml file. It will check for a sub folder called read if its not there then create it and then check the root folder for .eml files read them and save information from it to the database and then move the file to read.
We did not want to use pop3 cuz we wanted the mails to stay intact så we dont lose any information. so we ran for the IMAP4.
and in the asp.net I just run a query that checks the database and use the files.
I would like to send a message to an Active Directory user so when he/she loggs in next time they see the message though a popup window. Is it possible to do it in any way beside using the usual netsend?
This is usually a mess when trying to push out a message to a user. If you want a message to pop up, I would suggest that you create a small application with a pull mechanism. When the user logs in, the application should run to determine if they have a message waiting (messages could be in a central database or even file location). If they do, the application could pop up the message. In this way, the application would also bypass most of your firewall/network segment issues. You would only need to open communication to a central location for the data rather than diagnosing network issues for every client.
Not only would this method allow you to do exactly what you are asking for, it would allow you to expand your application to do even more. For example, you could require the user to acknowledge the message in a more formal way than just hitting OK (maybe make them check a box first saying "I read and understand the message"). You could also capture the time when the user saw the message (they might not log in for hours after you send the message). It could also be used when the user is currently logged in and you want to send them a message (the app could poll the server).
While there are downsides to this method (creating an app, installing it everywhere, managing it, etc.) I think the benefits would outweigh the downsides if you really need to have a notification system like you are specifying.
On Windows 2003 you've got an old fashion way of doing that.
In the scriptPath attribut of the AD user nod, you put the name of a script or exe file for example username.cmd.
On your DC, you've got a folder C:\WINDOWS\SYSVOL\sysvol\DOMAIN.NAME\SCRIPTS shared with the name NETLOGON. you just create the file username.cmd in this folder. the program username.cmd is going to be played on every logon of the user. In this file you can put a popup message.
It's still working on Windows Server 2008 R2.
I write system, that collects informations about local system. It's a system like admin-client. Client collects and sends log to admin. There's of course possibility to get this log by admin over LAN, but I'd like to add option send log over Internet.
I thought about skype. Client must have logged skype and when admin (of course there must be appropriate authorization, but it's separate topic) send request by skype - client must e.g. connect to SQL database or simple file with collected log and send it over skype.
How can I do this?
Is this the best way? Plugin in skype? What lib may I use?
I think it's an either/or situation.
If you want an administrator who is already using Skype to be able to send this information over the internet, then a plugin which exposes that functionality in Skype is the way to go.
If you want the administrator to be able to send the information over Skype's network, but not necessarily have to have the application running (perhaps this will be done through the application that gathers data), then using the API to control Skype externally is better.
You can find the documentation for Skype here:
http://developer.skype.com/accessories
Skype has a COM API called Skype4COM which you could use through COM interop in order to access Skype.
It should be noted that SkypeKit is now available for use in both embedded and desktop programs. There's a small one-time registration fee (currently $5 USD) for each program, but it will allow you to access Skype without actually using any UI functionality (it's completely up to you to provide the interface).
Until SkypeKit is released, you're limited to the Skype Public API. However according to the docs this API only allows to specify the recipient and open the file dialog, initiating a file transfer automatically seems to be impossible (see "OPEN FILETRANSFER" in the docs).
I suggest you use an open protocol like HTTP or FTP instead.