In a turn of events, “Shark Tank” judge Barbara Corcoran got her $400,000 back after an email scammer conned her bookkeeper.

And she has a German bank to thank for the return of her money.

Last week, Corcoran said her bookkeeper received an email from someone posing has Corcoran’s assistant with a request for a renovation payment.

How She Lost it

Corcoran told People magazine there was “no reason to be suspicious” about the email, as the bookkeeper continued to communicate with the person she thought was the assistant.

Corcoran’s staff uncovered the scam when the bookkeeper later emailed the actual assistant detailing the payment. The real assistant went back and noticed a hacker altered her email.

“I was upset at first, but then remembered it was only money,” Corcoran told People.

TMZ was the first outlet to report the scam. It traced the hack to a legitimate marketing company in Germany — FFH Concept GmbH.

Corcoran’s IT department then traced the emails back to a Chinese IP address, according to TMZ.

“The money was wired to the scammer yesterday and my bookkeeper copied my assistant, who was shocked to see her name on the correspondence. The detail that no one caught was that my assistant’s email address was misspelled by one letter, making it the fake email address set up by the scammers,” Corcoran said at the time of the hack.

How She Got it Back

But as fortune would have it, Corcoran got all her money back.

The German bank used by the scammer froze the account before the funds could be deposited in a Chinese bank account.

Corcoran said her team asked the bank to freeze the money so they could prove it was taken as part of an elaborate email scam. Once that was proven, the bank returned the $388,700 back to Corcoran.

“I’m thrilled!” Corcoran told Page Six in a statement on Friday. “I had already accepted it and moved on. Everyone told me I wouldn’t get the money back and it just seems unbelievable!”

Nipping Email Scams in the Bud

You can spot scams in different ways. Looking for grammatical errors and misspellings of common words is one way to stay vigilant. It’s important to pay close attention because scammers will use official letterheads and a lot of fancy government jargon in their attempts to pull the wool over your eyes.

Here are some other ways you can spot potential email scams:

  • The email threatens you with arrest or other legal action unless you immediately pay a fine or fee.
  • You are promised a benefit increase of other assistance in exchange for payment.
  • Someone requires payment by retail gift card, cash, wire transfer, internet currency or prepaid debit card.
  • You receive an “official” letter or report with personal information via email.

Most government correspondence comes in the mail. That includes any payments you may need to make.

If you feel you have been the victim of an email scam, contact your local law enforcement agency immediately.

Editor’s note: Have you been emailed or called by potential scammers? If so, did you lose any money or were you able to figure out the scam? Share your story below.