What I did:
1. I am connected to the internet using my phone.
2. I downloaded apache-james 2.3.2; executed run.bat from bin with default settings. No changes were made.
3. I have mail.jar and activation.jar in my build path
4. Used this code from a tutorial website
What do you mean? What happens if you run this code? But since you said nothing about settings up accounts or a DNS MX record, and are using an external sender address, it looks like you are setting up a send-only server (i.e., just SMTP, not POP or IMAP). In which case the question would be: why use a mail server at all? Why not use just the JavaMail API?
Ping & DNS - updated with new look and Ping home screen widget