as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
design an algorithm that can be used to detect spam emails.
user
this algorithm should be able to detect spam emails based on the content of the email, including identifying key words and phrases, evaluating the email for suspicious links and attachments, looking for signs of spoofed email addresses, and scanning for other suspicious behavior such as previous reportings or complains from users. additionally, the algorithm should also take into account the email's sender, frequency, format, and context.
assistant