Sending mail to the Professor for PhD, after seeing his tweet

That is perfectly fine. The professor chose to use twitter as a medium of announcing the position. They are expecting responses to that advertisement. It's always a good idea to explain how you heard about the position. Your email does all of those things.


Next time, just send in your message instead of posting a question online. What's the worst that can happen, after all? I'm not meaning to sound rude -- just to point out that you should go with your instinct and not worry too much about wording. In some cases (like this one), time is of the essence.