How to modify the default receiver list in system Mail app - objective-c

I'm using Objective-C. I wonder is there any plug-ins or libraries that can allow me to modify the default receiver list in system Mail app?
For example, I have made an app which can scan a card and fetch the E-mail information on it.
Now, I'd like to put the E-mail data I've fetched into system Mail app's receiver list. That is, when I use the system Mail app and write a new mail, I can see the E-mail address I fetched when I type some letters in the receiver column.
Is that possible to achieve?

This list is stored as a Sqlite database and it should be possible to append to it from another process, even while Mail.app is running. I haven't tested it, though.
The following article should help. It describes how to delete entries but adding new ones would work in pretty much the same way: http://hints.macworld.com/article.php?story=20110516152604993

Related

Search keyword in PDF and check if exists

The idea was to be able to, as soon as a receive a mail with a PDF attached, find a way in which the PDF can be downloaded and be searched for a specific keyword (for instance, see if my name is in it) and if my name is on any of the pages of the PDF, then send another mail notifying the user that there’s a pdf in which he has been named.
This is in order to avoid having to check dozens of mails daily and PDFs just to see if your name is in it or not.
I managed to do this using Zapier but I relied on PDFco’s API for the search, and it is payware, so I’m taking a different approach.
My question is more based on what library would make that search inside the PDF and would provide a Boolean value that said if the keyword exists or not.
Thank you!

Is it possible to deliver more than one pass in a .PKPASS file?

use case:
A customer bought a flight for his family.
Now he wants to download all boarding passes for his flight at once and store it in passbook.
How can I solve this problem?
Can I add more than one pass descriptions in a pass.json?
Or is it possible to reference more than one pass.json files in the manifest.json?
Short answer is No. You cannot include more than one pass in the pass.json or add a reference that will be recognised by Passbook.
Long answer is that there are a number of things that you could do to make it easier for the user. These include:
Send all the passes in a single confirmation email as attachments
Include links on the back of the passes to the other passes in the same booking
Include a single link on all passes and in any confirmation mesage / email to a page with links where each pass can be downloaded
Deliver the passes via an app
The last option would provide you access to PKAddPassesViewController class, which if used with the addPasses:withCompletionHandler: of the PKPassLibrary class, would allow for multiple passes to be added.

In MailChimp, how would use a merge tag to check whether someone's using Gmail?

Using merge tags in MailChimp, how would I go about detecting whether the recipient is using Gmail, and display a message in the header accordingly?
As an example, here's what I've got in my header now, which fires if a certain email address is encountered (as opposed to if gmail.com is seen in the email domain):
*|IF:EMAIL=someone#gmail.com|*
Using Gmail? Drag this message to your Primary tab.
*|END:IF|*
Knowing that MailChimp merge tags also supports the following:
*|IF:EMAIL != someone#gmail.com|*
You are not someone#gmail.com ...you must be someone else.
*|END:IF|*
Is it possible to show a message in the header only when the recipient is a Gmail user? What operator would I use? Clearly it's not = and it's not !=
MailChimp doesn't support partial match functionality in their api. Your best hope is to process your list as subsets of the master, with domain specific functionality wired into each set.
What I've started doing is set up a saved, auto updating segment and then export it, remove everything except email column, and import it (auto updating the list) into an interest group. You can then use the interest group within conditional merge tags (whereas you can't use a segment for that, segments are only for an email send).

Persisting VBA/VBScript macro settings

I've created an Outlook (2010) VBScript macro that has some user-configurable settings. I've googled and checked the likely resources and can't figure out a good way to persist them. I'm currently storing them in the body of a mail item! It don't get much kludgier than that!
Should I use the Windows registry? An ini file? Or??? And whether registry, file, or???, what key/folder/??? would I use?
Just before hitting 'Post' on this I tried one more google search and hit on this: http://www.jkp-ads.com/articles/DistributeMacro08.asp.
The gist I took away was, ini file or registry are both kosher. One nice thing about VBA's use of the registry is it automatically puts "app" data in the approved place, just need to give your "app" a key. Since my data is just a big string with parsing code already in place, I used strData = GetSetting(strAppKey, strSection, strLeafKey) and SaveSetting(strAppKey, strSection, strLeafKey, strData) and voila, all is good.
The standard Outlook way of storing settings, especially if they relate to a particular mailbox/store and can be accessed from multiple machines connected to the same mailbox, is to use a hidden message stored in one of the well known folders, such as the Inbox.
The hidden MAPI messages can be accessed using MAPIFolder.GetStorage: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.mapifolder.getstorage.aspx

How do I have mails to a specific address trigger actions on a web server?

What I'm trying to do is figure up how I can configure a mail server such that mails to a specific address will trigger certain actions- e.g. inserting the subject line into a MySQL database, etc. This is for a web app in LAMP- basically I want people to be able to add things automatically via email if they'd rather do that than use the web interface. Kind of like how e.g. with Evernote you can send a mail to your custom address to add a note that way.
I realize this is a pretty vague question, what I'm looking for is a general place to start looking and learning. I'm reasonably familiar with website tech but when it comes to mail servers I'm completely clueless. I'm not looking for any specific implementation: Rather I just want to know what are the basics I need familiarize myself to be able to attack the problem.
If you want to trigger actions "in realtime" you best work with your own mailserver and use something like procmail: Here is an example from the procmail faq how to trigger actions on incoming mails: http://porkmail.org/era/procmail/mini-faq.html#rtfm
But if you can avoid this, just let the fun stuff of mailserver work handle your provider and scan one or more mailboxes via cron-job (on linux/unix) triggered scripts. A cronjob could e.g. be a command line PHP script or a wget script that does a HTTP request on your webserver script to start the action. Your script reads the actual mails via something like http://pear.php.net/manual/en/package.networking.net-pop3.php
(Try to avoid importing the same mail twice e.g. by relying on the message id of the mail or by creating SHA1/MD5 hashes on parts or the body of the mail).
A lot of ticket systems work like this (for example OTRS: http://otrs.org/downloads).
This is traditionally handled on unix-like systems using fetchmail and/or procmail.