@Carie1
Personally I wouldn't have the door code on any information disclosed to the guest through the site right after booking.
As you say, send them this information yourself, and I would only do it shortly before arrival.
This to protect you. It might be overly protective. However, there have been numerous cases of theft after guests received codes, arrived as early as possible and once in cancelled the booking.
Or if they already got the codes longer in advance, they could cancel, but send a buddy to clear out the space.
Just saying.
That's also why many hosts change the code for each booking.