The hosts looked most likely to add to the scoreline as the game went on but it was Josh Scott who set up a nervy finale by netting the first competitive goal scored against the Welsh outfit at the Cardiff City Stadium.
However, the League Two outfit were finally put to the sword by Peter Whittingham's 91st-minute effort.
Dave Jones was without Joe Ledley, Ross McCormack, David Marshall and Gabor Gyepes due to international commitments, but the Bluebirds manager still named a strong team that included seven of the names that brushed past Scunthorpe 4-0 at the weekend.
Whittingham tested Daggers keeper Tony Roberts with two early efforts, and it was he who set up the opener, teeing up Rae to strike home from distance.
It was 2-0 just six minutes later as Will Antwi brought down Bothroyd in the penalty area and the Cardiff number nine slotted the resulting spot-kick home.
Paul Benson, who found the net 18 times for the visitors last season, was looking lively and he was first go close after the restart with a header that drifted wide.
Miguel Comminges and Michael Chopra then went close to adding to Cardiff's lead but could only watch as Roberts tipped their respective efforts around a post.
It was left to substitute Scott to set up an exciting final nine minutes with his strike from close range, but Whittingham settled any nerves in injury time.