This came up last session, after an evil character speaking to a crowd used suggestion to make the characters give up their most valuable possessions one player insisted he would seek out the person who had “attacked him” while I asserts this was not an attack I was unsure if his character would know he had been subjected to a mind effecting spell or not...
When the durations of the 3rd-level Sor/Wiz spell suggestion [ench] (Player's Handbook 285) et al. expire—which is immediately upon the PCs giving the caster their stuff, completing the task—, the PCs will realize they've just given their most valuable magic items to the caster based on the suggestion the caster gave when the suggestion spell was cast.1
There's no need to know any spell was involved: the caster is standing right there with their stuff. Unless that suggestion the caster made when the caster cast the suggestion spell is convincing enough without magical support, the PCs probably will beat up the caster and take back their stuff.2 Alternatively, a fast-talking caster may be able to convince the PCs that handing over their stuff was an idea the PCs willingly agreed to. Good luck: This DM'd make that Bluff skill check DC pretty high.
The suggestion process in steps
Presumably, the evildoer cast the 6th-level Sor/Wiz spell mass suggestion [ench] (Player's Handbook 285) normally, and all the PCs made Spellcraft skill checks to identify the spell as it was cast (DC 21) as they could hear the spell's verbal components, and all of them failed.
Then all of the PCs made saving throws against the spell, and all of them failed, therefore none of them sensed the "hostile force or tingle" (PH 177) that comes from succeeding on a saving throw against a spell with no visible effects.
Then, because the spell is language-dependent (PH 174), the evildoer issued the spell's actual suggestion in a language everyone understood, probably Common. Of course, that suggestion, as per the spell, was "worded in such a manner as to make the activity sound reasonable," so the suggestion was something like…
- Your most valuable magic items are cursed! They'll kill you unless you give them to me so that I can remove the curses upon them!
- Give me your most valuable magic items so that I can sell them and give the money to the starving children of this poor town. They'll die without your aid!
- The formula needed for dissolving the lich-duke's phylactery—that only I can make—requires your most valuable magic items. Give them to me, and I will concoct the magic acid.
…Or whatever. The DM's definition of reasonable as well as the circumstances surrounding the spell's casting apply here a lot. (By the way, I assume those commands are issued to PCs not in combat with the evildoer. And if you thought those example commands were only borderline reasonable, imagine the whoppers that'd be needed to get the PCs to fork over their most valuable magic items in the heat of combat!)
Finally, after the PCs have handed over their most valuable magic item—completing the command—, the spell's duration expires, and the PCs are free to do whatever they want.
That will likely leave the PCs right next to the evildoer who now holds the PCs' most valuable magic items. Normally, I'd expect the PCs to totally slaughter the evildoer or the evildoer to teleport away, cackling. However, if the evildoer hasn't yet revealed himself as an evildoer, the evildoer may try to convince the party—probably through a Bluff skill check made to tell a lie—that they willingly gave him their magic items according at his suggestion [n.b.], thank you, and now he'll be going to do what he said he'd do (e.g. remove the curses from them, sell them to feed the poor, make magic acid from them) (Pro Tip: Actually—as you probably guessed—, he'll keep them, distribute them among himself and his minions, or sell them and keep the profits!)
So a high enough Bluff check result may leave their characters in the dark, but the players will know something's up. So role-play! If this is such a good idea, find out more. The PCs could beg to watch him do what he says he's going to do so they can learn from him! They could explain that the smiling faces of children bring them hope and joy! They could offer to help the evildoer with his arduous task! And so on.
Tips for using suggestion
The spell suggestion is a role-playing spell, and, in the hands of a clever player—on either side of the screen—, an extremely dangerous and versatile one. Yet the spell has limits, and one of those is that the caster who makes a short-sighted demand like Hand over all your gold! means that when the task is finished and the spell expires the caster is left there with a bag of gold… and the bag of gold's owner standing right in front of him! This makes suggestions like, "I hear your mom calling you; you better go find out what she wants," or, "Your friend's possessed and is plotting against the party! You better knock him unconscious before he hurts anyone!" are usually better suggestions than, like, "Hand me your magic sword."
Likewise, it's up to the DM to adjudicate the spell suggestion so that what's suggested is only one thing. No fair using the suggestion spell to make multiple suggestions: "The world's magic is fading! Give me your most valuable magic items and all your gold and don't attack me while I plane shift to keep them safe for you in Celestia!" That just ain't right.
Note: I don't really know what to make of the whole attack disagreement you had with the other player, so I'm just gonna put this out there: According to the invisibility spell, "[f]or purposes of [that] spell, an attack includes any spell targeting a foe or whose area or effect includes a foe." Elsewhere the game typically uses attack as a synonym for the attack action. However, I don't think either definition has an impact on whether the player believes that his character has been (metaphorically or literally) attacked after a foe uses upon the character the suggestion spell.
1 Suggesting that folks forget stuff can be a thing. Although this isn't an option normally and reliably available to everyone, Dragonmarked on Mnemonic Training says
Just as Autohypnosis can be used to memorize text or phrases, it can be used to forget them. Each successful DC 15 Autohypnosis check allows a character to expunge a message he has read or heard (up to 800 words) from his memory. Multiple checks allow a character to forget longer conversations or documents.… If you do not use the Expanded Psionics Handbook in your game, characters can accomplish this task using the Concentration skill but with +2 to all DCs. (75)
Whether such techniques can be used by anyone or only those of House Sivis in the Eberron campaign setting is the GM's call, as is whether such techniques can be used to forget events as well as conversations, phrases, messages, and text. This DM would make a creature cast the spell suggestion specifically to make a creature forget one or more events, though.
2 To create an analogy: A dude greets you on the street and makes an impossibly convincing argument that you need to give him your wallet right now or his child will die. However, after you hand over your wallet, that argument doesn't seem as convincing as it did moments before. The problem? Dude still has your wallet. The other problem? Real-life you probably doesn't carry a sword.