The phrase "not in accordance with the letter of the law" implies a violation of legal norms that are explicitly written down. This can refer to actions that are technically illegal, but still may not be considered morally wrong. There are a variety of synonyms and related phrases that can convey similar meanings, including "breaking the law," "flouting legal requirements," "violating regulations," "contravening legal statutes," and "being in breach of legal codes." Other related terms include "unlawful," "illegal," "illicit," "non-compliant," and "offending against legal standards." When it comes to legal matters, it's important to use precise and specific language to avoid misunderstandings and confusion.