The purchase is part of a European expansion drive by Deutsche Post.
"UK Mail is well-run and an established provider of quality delivery services in the UK. It offers a complementary fit with our integrated offering," said Deutsche board member Jurgen Gerdes.
UK Mail directors said it believed the deal was "fair and reasonable".
Under the terms of the deal, UK Mail shareholders will receive 440p a share.
UK Mail suffered technical problems last year at a new sorting centre which left it having to handle bulky parcels manually.
This led to higher costs which reduced its profits.
The parcel delivery company has a network of more than 50 sites across the UK and more than 25,000 customers.
German postal firm Deutsche Post has agreed a deal to buy UK Mail for Â£242.7m, which will see it compete with Royal Mail for parcel deliveries.