You can use dear professor, but not dear teacher.
1. When writing a letter to a teacher, it is generally recommended for unmarried female teachers to use Dear Miss + surname. If it is a male teacher Dear Mrs + surname, it is generally not necessary to start with dear teacher.
2. The opening sentence Dear Professor, in a formal letter, is the first and last name, such as Dear Prof. Peter Marlow. If only the last name is added, it can also be used as a formal style. Once you are familiar with it, you can write Dear Peter or even Dear Pete.
The format of English letters:
1. Letterhead: refers to the address and date of the sender, written in the upper right corner of the letter paper.
2. Title: refers to the address and title of the recipient. Write below the letterhead, starting on the left side of the paper. When writing to someone you know well, such as Wang Ming, use Dear Wang Ming or Dear Mr. Wang.
3. The body of the letter: refers to the main part of the letter, from the next line of the salutation to the closing sentence, with the first paragraph written at the top.
4. Conclusion: refers to the polite closing words below the text. Commonly used are Yours sincerely, Yours ever or Yours or Yours truly, Truly Yours, etc.
5. Signature: refers to the signature of the sender, written below the conclusion.