Rotten door frame fix with two-part epoxy resin and hardener. Similar to Richard Morley's rotten door frame fix: http://www.brainfizz.uk/2013/10/avoiding-rotten-prices-associated-with.html
Step 1: Chop Away Rotten Wood
Using a chisel, a saw or an oscillating tool cut away all the dark rotten wood. If possible make a diagonal cutting line which will expel water to the outside of the frame and increase the surface area to attach the new piece to.
Step 2: Fill the Gaps With Pieces of Wood
In the first picture you can see an encapsulated rusty nail and the sides of the bricks covered with the dry flex polymer making it impossible for water to get through the wall.
On the bottom I made a mold with a few pieces of wood and filled it with the pattex power fix polymer. It is not intended to be used in this fashion. It was difficult to get it to spread out evenly and took a couple of days to dry. With dry-flex 16 it would've cured in 16 hours.
With a hand saw or a jigsaw make small pieces of wood that fit together inside the gap.
Cover the pieces with pattex power fix to make them impregnable to water and glue them inside the gap with pattex power fix.
Step 3: Use Dry Flex to Fill the Remaining Gaps
If you use two separate caulking guns as shown in the first picture be sure to pull the handle all the way down every time for both compounds to mix in the right proportions. To stabilize the tube of the hardener (component B) inside the caulking gun, find a small coin or round metal disc slightly smaller than the diameter of the component B tube. Drill a hole in the disc and replace the existing thrust disk. A cable tie at the front keeps the tube from falling out.
Use dry flex to glue the outside pieces of wood onto the dried pattex power fix pieces.
After curing sand off the excess polymer and the frame is ready for a new paint job.
Product website: http://uk.repair-care.com/products/dry-flex-16