Section 32. Any person not a resident of the commonwealth who engages in business in the commonwealth, as defined in section one, shall, as a condition precedent to engaging in business in the commonwealth and by so engaging in business in the commonwealth, be deemed thereby to appoint the secretary of the commonwealth his agent for the service of process in any judicial proceeding under this chapter. Such process shall be served by leaving a copy of the process in the hands of the secretary of the commonwealth or a deputy or in the office of said secretary. Such service shall be sufficient service upon the person; provided, that notice of such service and a copy of the process is, at least fifteen days before the return day of such process, sent by registered mail to such person's last known address, and that the sender's registered mail receipt and the commissioner's affidavit of compliance with this section are appended to the process and filed in the action or proceeding on or before the return day of the process or within such further time as the court may allow. The court in which the action or proceeding is pending may order such continuances as may be necessary to afford the defendant reasonable opportunity to defend the action. Service of process in the foregoing manner shall be of the same force and validity as if served upon the taxpayer personally within the commonwealth.