Dear Safdar Gholi,
....
Dear Safdar ....This is an informal letter and therefore you need to adopt a friendly tone. We generally don't call our friends in their full name. So, first name would do for this purpose.
How are you Safdar ?
... Don't repeat the name. Also, better you say something like;
Hope everything is well with you.Last night that I was talking to you I found that you feel too lonely in this city as you are a new student and you may have no intimate friend here.
.... In reality, we don't send letters to people with whom we talk too often. So, the "last night" part sound inappropriate in this context. Open an informal letter with a general, friendly paragraph to show that you care about the friendship. For example;
How is your family doing? We haven't met each other since last summer and I really looking forward to meeting you in my next vacation.