How to preemptively determine when email has arrived? - windows-8

I want to listen for incoming emails and, if they are of a certain format, intercept them (process them and preferably prevent them from proceeding on to the email inbox).
What event should I monitor for this? Is there something like a "FileSystemWatcher" that knows when email is incoming, or...???

What you are asking is not possible.
The reason is this: What email account are you listening to? And what is raising the event? You reference the file watcher, but do you see how simplistic a file watcher is compared to email? What if the current user has 10 email accounts - what do you expect the OS to do? Raise a NewEmail event for each email? And, what if they are running Outlook, Windows Live Mail, Windows 8 Mail, and some other client. How would the OS know in the first place? If each client is monitoring a different client, what are you expecting to happen? For this reason, what you are asking is not possible.
The short of it is: the OS is not monitoring user email accounts.
However, if what you are attempting to accomplish is to monitor an email account and respond when that account receives new email, this is not a Windows 8 question anymore. This is a POP or EAS question where you connect to and monitor an account just like an email client does. You would not be wise to do this on the client, either. Since Windows 8 apps are not always running - a server/service would be a smarter approach.
Specifically to your question, though: not possible.
Good luck, I hope that answers your question.

Related

Odoo 10.0 why Mass Mailing/Campaign stops sometimes?

is it normal?
like if you check the image i am sharing, i am getting this and it is not changing anymore (seems like it is stuck). it will start sending emails after i will restart odoo service. Please adviseenter image description here
If want to send mail immediately, then set up Email queue manager. It available Setting->Automation->Scheduled actions->Email Queue Manager.
And also if you use any free smtp server like gmail, then gmail only provide you some limited no. of mail per day. So you can't send large no. email for mass mailing.

Send email to pushbullet?

The website "PushBullet.com" is webwashed(filtered) by our proxy, at work.
But I really need to send some notifications to my devices.
Is there a way to send them thru the good old email protocol ?
So there is no officially supported feature for this, but you can sort of fake it using the existing email-to-push feature.
Send a push to an email address that is not a pushbullet account, such as yourgmailaccount+randomstring#gmail.com. It will have a from address of someotherrandomstring#pushbulletuseremail.com.
You can then send emails to that address, and they should show up in your pushes list.
Proposed method with random strings in email address doesn't work.
This method works. Not an email, just pure notification as required.
The library developer suggests also command line notification send. Simple and handy.
I was looking to do something similar so I could get pushbullet notifications from cron jobs, and came across this:
https://github.com/side2k/email2pb
I haven't gotten a chance to try it yet but I think this will do what you're wanting. Just tested it, and it works really well if you're able to run a postfix server.
I use Zapier for this (you can do it with a free account).
Set up a Zap to search for new mail under a label (I use "pushbullet-notify"), and send any message there to Pushbullet.
Then in Gmail just create filters for any mails you want PB notifications on, applying the same label.
The notification may be delayed up to 15 minutes from the time the email is received and labeled (free accounts check every 15 minutes).

PHP script to send and retrive sms from a website

I'm not sure where to begin, but got a case I need help from others where and if possible to solve.
Thing is, got a new alarm system at home, this system uses sms function so I can send a short code to my alarm asking for status if it`s ON or OFF, or i can turn it on/off from an sms.
Since both the sms number and code is strictly personal, I would not like to tell my carpenter the codes, but in the mean while he is working at my home, I can give him a login to my site, where he can see if the alarm is turned on or even turn it on/off by him self.
I would like to build me a website, that does the same.
Got a login to my site, when logged in, i would like the website to send an sms automatically, then retrieve the answer and display it on the website.
Is this even possible ? If so, anyone can past me in the right direction here ?
Thanks in advance =)
You can send an SMS from a website. Most mobile operators will gladly offer you an apropriate API.
For instance Deutsche Telekom has an API called "Developer Garden" that allows you to send SMS via a WebService and much more.
see here for an example: www.developergarden.com
Other providers may also offer such services.
you need an sms gateway ( we use these guys : http://inteltech.com.au/, but nearly any will do )
Your easiest option is to find one where you can insert SMS'es for sending via a URL, eg in our case the URL looks like this:
http://inteltech.com.au/secure-api/send.single.php?username=[user]&key=[longcode]&method=http&senderid=[id]&sms=[phonenumber]&message=[here's the message]
it's extremely simple to use. If your site handles the login otherwise, then you can use this for the rest.
Now, how to receive SMS'es is a bit tricker :)
But this provider, for example, offers you options to;
Send the reply as an email to a nominated email address.
Send the reply as an email to the original user who sent the message.
Send the reply as an SMS to a nominated mobile number.
POST the reply to your website or application . e.g. We can call a http/https request to your script
as you can see, both the email and the POST options are providing great ways to integrate.
I'd say if you don't handle incoming email already, then stick to the POST method.
voila :)

Are apps that access gmail only have write-only access or full gmail access (potential security risk?)

I use a backup app to backup SMS text messages to my GMail account registered on my HTC Desire Z Android 2.3 phone.
The app requests access to the gmail account. But what does this actually mean? Does it mean:
the application has write-only access to the gmail - i.e. can insert emails but not delete or adjust other existing emails (does the Android API provide for that?)
the application has full access to the email, and could potentially delete emails if there was a bug
First off: this question doesn't seem to belong on Stackoverflow. This site is for asking specific questions about coding problems, not about how some code in some program based on some SDK on some device may or may not work.
If an application can access your Gmail account, as far as I know, this means full control, including deletion.
That doesn't have to mean there is actual code in the program that even tries to delete something, but I guess you're right: coding bugs could probably delete your email.
But that goes for a lot of applications: you trust the developer to test extensively before you rely on him/ her to handle your photos, email, passwords etc with care right? :)

How can I avoid Outlook's security warning when sending email programmatically?

I send email through Outlook using VB.Net 2005; this is working fine.
At the same time, however, I receive the following message:
A program is trying to automatically send Email on your behalf.
Do you want to allow this ?
if this is enexpected, it may be virus and you should choose no.
Is there any way to avoid this?
This is "by design". It's done to prevent viruses from doing things like going through the address book and automatically sending emails on the user's behalf. Having the dialog prevents a virus from silently becoming a spam bot.
I know this isn't answering your direct question, but is there a reason you can use the System.Net.Mail.MailMessage class and send using that? Or is this because you want the e-mail to show up in their sent items?
You need some library like Redemption to circumvent this popup. It's the default built-in security behaviour of Outlook (since version 2002 I think).