Your broadcastReceiver's onReceive Method will be only called if you have registered your broadcastReceiver within your manifest file.
Between intent-filter tags you can specify for which actions your broadcastReceiver should be informed.
Note that your onReceive Method must complete within 5 secs not to get a forced close warning!
Using xml Syntax Highlighting
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
<application>
...
<receiver android:name="YourBroadcastReceiverClass">
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED"></action>
</intent-filter>
</receiver>
...
</application>
</manifest>
Parsed in 0.001 seconds, using
GeSHi 1.0.8.4
The sample action is for SMS receiving notification. However, I do not know by heart how the action is called for eMail received. You have to look it up.