Scamming is just another player interaction, facilitated by in game systems, Trade Window, Mails, etc.
If you are doing trade with someone you don't know or don't trust or haven't done trade with before, then never do it via Mails System.
That is a recipe for disaster.
If you are trading items to somone for them to craft for another item or upgrade using those mats, always look for someone you trust or in guild/family before asking someone in a public chat.
Trade window is super annoying on purpose to ensure that you are checking the items and that no one can change them after confirmation. If the correct amount or items agreed upon are not input, do not click the Lock, or, trade button. etc etc etc.
Always make sure you are the last person to Click "trade" after doing the locks. (Wait for "your partner confirmed the trade" or something)
Alternatively, you can use AH for sale of items.
Yes it sucks to be scammed.
However, the system in place to prevent such scamming is sufficient for both sides, though while only limiting you to trade with "Greens" as it were.