1) "This is to inform you" is talking about the letter (et cetera) which you have recieved. You would put either that or "We are writing to inform you". 2) By is just a shortened version of "on or before", both are acceptable and grammatically correct.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.