Section 49. Any corporation may by vote of its directors appoint a resident agent as its true and lawful attorney upon whom all lawful processes in any action or proceeding against such corporation may be served. Such resident agent shall be either an individual who is a resident of and has a business address in the commonwealth, a corporation organized under the laws of the commonwealth or a corporation organized under the laws of any other state of the United States which has complied with section 15.03 of subdivision A of Part 15 of chapter 156D and which has an office in the commonwealth. Such appointment shall become effective upon the filing in the office of the state secretary of a certificate, signed under the penalties of perjury by the clerk or an assistant clerk of the corporation, setting forth the name and business address of the resident agent and a copy of the vote of the directors appointing him as such. Such corporation may by like vote revoke any such appointment or appoint a new resident agent, which revocation or appointment shall become effective upon the filing with the state secretary of a certificate, signed under the penalties of perjury by its clerk or an assistant clerk, setting forth a copy of the vote of the directors revoking such prior appointment or appointing such new resident agent and, in the case of the appointment of a new resident agent, the name and business address of such agent. In the event of any change in the business address of the resident agent of any corporation, a certificate setting forth the new business address of such resident agent, signed under the penalties of perjury by such resident agent, shall be filed with the state secretary within five days of such change. Any resident agent of a corporation may resign as such agent by filing with the state secretary a certificate, signed under the penalties of perjury by such agent, setting forth the fact of his resignation and the effective date thereof, which shall be not less than thirty days after the date of the filing of such certificate, and stating that a copy of such certificate has been mailed, postage prepaid, to the corporation at the address of the principal office of the corporation in the commonwealth currently on file with the state secretary or, if that office is also the office of the resident agent, at the address most recently furnished to such agent by the corporation as the address to which copies of all processes served upon him as such agent are to be forwarded. A resident agent may also be appointed by vote of the incorporators, in which event the name and business address of such resident agent shall be set forth pursuant to section twelve in the form on which the articles of organization of the corporation are filed with the state secretary and such appointment shall become effective when the articles of organization are filed in accordance with section six. Any such appointment by the incorporators may be revoked by vote of the directors, in the manner provided in this section.