How can I avoid Outlook's security warning when sending email programmatically? - vb.net

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).

Related

Registration process with mail confirmation in Selenium

I have question about registration process in selenium. Which way is best to do it if we must click activation link in received email? Which method is used by commercial QA teams?
I am thinking about this problem and I want to use sites like '10 minutes mail', is that a good way?
There's any other options? I can't use same mail multiple times.
Creating new 'true' mail every time will be difficult and will take too much time, there will be captcha problems etc
you can use a mailbox as registration mail, which supply API to read mail content in inbox, rather than only can from UI. Therefore you can easier to get the activation link and send http request to simulate click activation link.
Try using regular gmail account, there is a trick with '+' character and You can re-use multiple times, and mail is getting received on same account.
So You can use like this: open gmail with desired address, eg. address testmail#gmail.com, so You can reuse it in following iterations:
testmail+1#gmail.com
testmail+2#gmail.com
...
testmail+test1#gmail.com
testmail+test2#gmail.com
and so You can have...lot of accounts. I've used this method and its quite sufficient.

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).

Sending an Email Behind the Scenes

I am currently trying to figure out how to send an email behind the scenes. Basically, I don't want an MFMailComposeViewController popping up making me press the send button. All the fields are pre-populated so there is no need to type anything out. Is this possible? Will I have to use another framework?
Thanks
You'll have to use your own mail server (or ask the user for credentials for their own, which you probably don't want to do). The iOS SDK intentionally doesn't allow you to send an email on behalf of the user with no user interface; making the user press "Send" is the whole idea so that they are never surprised.
Apps that push email out automatically either do so from their own servers, or integrate with a server framework like Mailgun, or Parse, or etc, that offer this feature.
I've done that in one of my apps using Mailgun, which is a hosted email web service.

How to preemptively determine when email has arrived?

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.

Can Outlook Interop API not recognise a DeliveryNotification

Story goes: My user sends an email to their client. My user ticks of "delivery notification" / "read notification". The client responds on the notification. Now my user has a "notification" sitting in their inbox. My application may attach that "email" to a project database, happens with any other regular email.
Now a bug report ticks in (feature request) on my table. My user like to attach those "notifications" to the project in question, but my application does not recognise the notification as an email.
Having recieved this feature/bug request, I start investigating. When I right click the mail in question I'd expect to have the option of attaching the mail to a project. I do with regular emails, but not with the notification email.
First off: Isn't a delivery/ read notification just like any other email. Apparently not as it is not being recognised in the first run.
Second: If it isn't an email, what is it then. Apparently it does not exist. WT'bip'...
I found an enum DeliveryNotificationOptions under System.Net.Mail, but I'm using the Microsoft.Office.Interop.Outlook and the MailItem in there. I found the MailItem.OriginatorDeliveryReportRequested which is what the client's mail application has replied to and sent my user the notification.
I have the Outlook addin both as an Office2007(.Net3.5) and Office2010(.Net4) version, the 2003 has been retired. The way I see this it goes beyond office and .net version concerns.
Any light or pointers people like to share on this matter would be appreciated.
It's called a ReportItem (DeliveryNotification).