You need to go in person to DMV and they will give you an extension no other choice
You will need to go into the DMV and get the extension as they will extend your registration period to accommodate a reasonable time to get the vehicle fixed and smogged.
What did the mechanic say was required to pass it? Find out the problem and pay to get it fixed. It should say it on the paper that came in the mail. If not then just go to the DMV to see what they can do. Good luck.
Thanks! Your answer is awaiting moderation.