We strongly recommend booking accommodations as early as possible, even though official invitations have yet to be sent out. Our wedding isn't quite in October but that time of year is still very popular in Salem and lodging is limited.
It is possible to get from Logan Airport to Salem via Public Transportation with a little planning. From your terminal take the shuttle bus to the Blue Line Airport station. Take the Blue Line inbound towards Bowdoin to the Government Center stop. From there, transfer to the green line heading towards North Station/Lechmere. Get off at the North Station stop to transfer to the commuter rail train. You can get a ticket either at the ticket window or on the mTicket app. You will need a ticket to Salem, or "Zone 3." Take the Newburyport/Rockport line and get off at the Salem stop (the Salem stop is before the line divides, so you can take either the Newburyport or Rockport train). With good timing and a little luck, this would take about 1.5 hours. The commuter rail schedule is linked below.
The Boston Salem Ferry is definitely the best way to get to the North Shore if you do not plan on renting a car. It even has a bar! However, the schedule is generally much more limited than the commuter rail so be sure to plan and book in advance. Taking the Blue Line from the Airport stop toward Bowdoin to the Aquarium stop will get you within walking distance. If you Uber from the airport to the wharf make sure you give yourself plenty of extra time, Boston is notorious for traffic. If you can swing it then this our recommendation.
Although it might be pricier than your standard ride, you should be able to get an Uber or Lyft from Boston to Salem. They are also generally pretty reliable in Salem but in case you would like to book something more concrete here is a list of North Shore taxi services.