iPhone notes on Gmail
Actually, what distinguishes the notes from normal mail messages is two custom headers:
X-Universally-Unique-Identifier: <hex-string>
X-Uniform-Type-Identifier: com.apple.mail-note
The Unique Identifier is a string of hex bytes grouped like this:
43433028-0184-4885-8FDC-15CF8CEE0629
Here is how you can manually create a note in your Gmail Account which the iPhone will then sync:
Type up your note in this format (between the lines of dashes) and save it in a file, i.e. testnote.txt:
----------------
From:
yourname@gmail.com
To:
yourname@gmail.com
Subject: The note title, usually the same as the first line of the note
X-Uniform-Type-Identifier: com.apple.mail-note
The note title, usually the same as the first line of the note
is repeated in the subject. The note itself can contain some html formatting
but I have not experimented to find out which tags are supported and which are not. At least br (line break) and b and i (bold and italics) work.
-----------------
Open a terminal window (on a Mac or Linux computer) and type the following:
sendmail
yourname@gmail.com < testnote.txt
Then go to your Gmail Inbox and apply the label "Notes" to the message that should just have arrived there.
If you now open the Notes app on your iPhone, you should see your new note there; however, if you edit and save it, it will be created a second time, presumably because our test note is lacking a Unique Identifier string.
So the challenge is to figure out how to generate the Unique Identifier string Apple uses to remove the older version of a given note after editing and updating.
Presumably one could write an interface using the Google API or else stick the note into the Gmail account using IMAP; that would take care of applying the label, too, because it could just be shoved straight into the notes folder. In fact I think that is what the iPhone notes app does.
Ultimately though the notes are not really mail messages which is why "replying" to a note in Gmail does not really work -- the reply will lack the two custom headers and thus will not be seen by the iPhone.