If anyone is interested I've been able to hack (and I stress that term) the ability to push emails to the Pre via SMS. The reason I did this was for two reasons.

1. I am using Groupwise and it doesn't support IDLE
2. Only the top level Inbox folder syncs on a set timer.

It requires you know a few things:

1. Sender Name - The name of the entity sending the SMS. For example in our organization when we send SMS alerts from our servers it comes across as from '6245'. You should be able to get this from the banner that is displayed when you receive a text message. I sent a number of text messages to see what the name of the sender.

2. Folder IDs you want to sync - because I have not figured out how to get the list of folder ids via a service call I had to gather them manually. I was able to tail -f /var/log/messages and tap each folder and watch them sync. An error message will be logged that looks like this:

2009-06-18T20:51:56.310272Z [2832] castle user.err LunaSysMgr: {LunaSysMgrJS} Error: NotificationAssistant.setFilter(a=45079976738825, f=76965813944368, m=undefined), file:///usr/palm/applications/com.palm.app.email/index.html:0
What you are looking for is f=xxxxxx. That is the folder id. FYI the a=xxxxx is the account id.

Do this for all the folders you want to sync. you should have a whole bunch of folder ids that will placed in an array.

Side note - if someone can figure out how to use the service call folderList and pass the account id then we can do this programmatically. It'd be evben better to figure out how to retrieve only the starred folders. Hopefully someone smarter than me can figure this out. Anyone????

Ok now to the actual hack:

1. You will need to modify /usr/palm/applications/com.palm.app.messaging/app/controllers/notification-assistant.jsjsjs. $In$ $that$ $file$ $you$ $are$ $looking$ $for$ $line$ $119$ : $NotificationAssistant$.$prototype$.$considerForNotification$

2. Get sender name and actual message. You need to add a few lines to get the sender name and the text message. To do this locate the following IF statement:

if(notificationData.get('playSoundOnly') && this.Messaging.messagingPrefs.enableNotificationSound) {
	return; // don't display any visual notification
Right after this statement add these lines:

var name = MessagingUtils.generateNameString(notificationData);
var message = (notificationData.get('messageText') || notificationData.get('summary') || "")
The first one will get the sender name and the second one will get the actual body of the text.

3. Determine Sender. Now that you have the sender name regex it for the "Sender Name" you determined from above. If you haven't done this go back to the beginning again and make sure to get this our you can't make this work.

Add the following code beneath the two lines you just added:

var isRGS = name.search(/6245/i);
YOU MAY WANT TO CHANGE THE VAR NAME! This line is regexing the name string for the sender name. You will get a -1 if it is not found or the position where it is found in the string.

4. OPTIONAL - Determine if you need to filter out certain messages. For example we use nagios to send messsages about server status. I do not want to intercept those messages. Instead I want them to continue to be treated as normal text messages. You may have a number of different automated messages coming to you so you may need to have a number of regex expressions to filter certain ones out.

I only need to do this for nagios messages. So I regex the message to look for the nagios string. Obviously if you have multiple conditions you need to filter on repeat this step.

var isNagios = message.search(/nagios/i);
YOU MAY WANT TO CHANGE THE VAR NAME! So here I regex for nagios so I can leave those alone.

5. Add new if statement. You are looking for the next if statement that actually determines if a banner should be displayed for the text message. Look for these lines of code:

if (notificationData.keys().length > 0 && this.Messaging.messagingPrefs.enableNotification) {
	var notificationType = notificationData.get('notificationType');
	if (notificationType == this.Messaging.notificationTypes.newMessage) {
		// if the new message is an MMS, retrieve the part data
		if (notificationData.get('messageType') == "MMS") {
			this.mmsPartRequests.push(MessagingMojoService.getMMSParts(null, notificationData.get('messageId'), this.sendNewMessageNotificationAndUpdateDashboard.bind(this, notificationData)));
		} else {
			this.sendNewMessageNotificationAndUpdateDashboard(notificationData, null);
We are particularly interested in the else statement. We need to put in an else if statement to catch SMS push alerts.

So right before the else statement add this code:
} else if (isNagios == -1 && isRGS != -1) {
	var folders = [76965813944360, 76965813944379, 76965813944369, 76965813944368, 76965813944363, 76965813944367, 76965813944366, 76965813944365, 76965813944364, 76965813944339, 76965813944377];
	for (var i = 0; i < folders.length; i++) {
		this.controller.serviceRequest('palm://com.palm.mail', {
			method: 'syncFolder',
			parameters: {'folder': folders[i], 'force':false}
Code Explaination:
The conditional statement is checking for two things (yours may need to check more).
isNagios (you may have changed this var name!) is checking to make sure that nagios is not in the body of the text message. isRGS (you may have changed this var name!) is checking to make sure that the text message is from our server. In this case it is making sure -1 (which means the string I'm regexing is not in the string provided) has not been returned. (I'm doing this because I'm not sure if it returns a zero when the string your searching for starts at the first character, obviously this would be bad!). So I play it safe this way.

The next line: var folders is creating the array of folder ids I want to iterate through and sync when I received the sms. You should have found these at the beginning in the /var/log/messages. If you don't have these you should start from the beginning.

The for loop iterates through the folders array.

this.controller.serviceRequest allows us to call a service and in this case execute some functionality. The service I am calling is palm://com.palm.mail and the functionality I am executing is syncFolder.

The syncFolder method requires two parameters:
a. folder - which is the folder id. In our code that is returned by folders[i]
b. force - I'm not sure what this does. I suspect it forces a sync no matter what. I have no idea really. Somelse have better insight? You can set this to true instead of false. However it has always synced when set to false

And that is it. Of course you will need to reboot before this code takes effect.

At this point I am stuck on the folderList call. I'd like to use that to return the folder ids. I think you should be able to send that method the account id to retrieve them. I also think you can retrieve the starred folders via that method. it might the subscriber parameter that enables this. I am not sure because I have no published API. I am doing this by reverse engineering and looking at other code.

It does two things:
1. Suppresses the banner message that you received a text message. However you can still the text message when you open the application.
2. Syncs all the folders you specify

Hope this helps and others can build on it. I'd also be willing to post this on the wiki if someone gives me write access. Maybe if I try:

rootfs_open -w