You don't have to accept the documents, but you will eventually be served (if you haven't been already). The rules for service of a lawsuit can vary by state, but all of them provide for some sort of "substituted" service. This means if they haven't been able to serve you personally, the court gives them permission to serve you by other ways -- usually by posting on the property, by advertising the lawsuit and/or mailing the papers to your last known address. Also, if you, or another adult, was home when the sheriff left the papers on your porch, that might be considered service under your state rules. You don't have to physically take the papers to be served.
If you are the legal owner of the property, then the fact that the foreclosure lawsuit doesn't have your current legal name will not stop the foreclosure -- the mortgage company can always amend the complaint, if necessary.
Service of process is complete when they hand you the papers, whether you accept them or not. If you refuse to take them and they fall on the ground, that is probably still good service. You don't explain what you mean by the wrong legal name, or how that issue impacts the foreclosure action so it is difficult to say more.
They will keep trying until they serve you, or they may apply to the court for leave to serve you by publication in the newspaper. Either way, you should not ignore the lawsuit - it will only make matters worse. Consult an attorney who is knowledgable in foreclosure defense, explain whatever the issues are relating to your name. In addtion, the attorney if he or she understands foreclosure defense, will ask you many questions about your loan and the servicing of the loan to ascertain what defenses and defense strategies may be available.