I know I'm reviving an old thread but as it's still persisting, I thought people experiencing it now should know it is indeed still the same ultimate issue.
I created a rule to act as an 'out of office' responder and as others have mentioned (and someone else shared the dialogue box screen shot of), after setting the rule, Mail prompts if you want to Apply (highlighted as default) or not apply this rule to the appropriate mailbox(es), etc... I pressed 'Apply' and as such it applied the out of office to every e-mail in my mailboxes, going back over 2 years. It started sending an out of office to ~100,000 e-mails.
Needless to say, I turned off wifi and it stopped, after countless thousands went out.
I know that some have shouted from the rooftops that this is user error and not Apple's issue but a bug is a bug. This is not a bug in code but it IS a bug in the user interface. The dialogue in the box is not as clear as it should be and for most users who seldom, if ever, set 'rules', it should be much more clear as to the implications of the action. To get around this, maybe Apple should consider a simply 'Out of Office' tool/feature and as such remove the need for the average user to need to set a rule for a likely temporary action.
After turning off wifi (I was not hardwired), I took my mailboxes offline, closed Mail and turned off my computer. I waited a day (I was scared, it was the weekend and my iphone was still sending and receiving e-mails normally so I wasn't really cut off) even though I'm sure 1 minute would have sufficed, turned it back on, and all was right with the world again.