Two assumptions have been made by other answers.
- That the line manager is based in the same office or at least that the relationship shared with the manager is one where they converse on a fairly regular basis and that the conversation has certainly extended beyond the brief greeting.
- The relationship between the colleague resigning and his line manager is not strained or was the sort that discouraged unnecessary conversation.
The situation we are experiencing is where the line manager is on a different
continent, 5 hours behind us and, due to poor management on the business's part, have made her the manager to whom our research colleagues in London need to report. Needless to say, she has kept her distance from all bar one of them and her relationship with the others is such where she appears indifferent to them and their day to day needs. In this instance I would advise contacting her via email (especially due to the differences in time zones and her already manic if not erratic schedule) and, whilst always displaying professional courtesy, keep the message short and to the point.
Notice of resignation, as a subject header, allows the email to stand out from hundreds of others while remaining professional and to the point. In the body of the email I would also advise thanking the business for the opportunity given to work for them and/or polite thanks for the experience gained. Remember, no matter how much you did or did not enjoy working for the company you're leaving, your written words will stay on file long after its context has been forgotten. So always be a good sport.