File photo of a Walgreens pharmacy in Niles, Illinois.

U.S. drugstore company Walgreens Boots Alliance's profit and revenue beat analysts' estimates in the fourth quarter, as it benefited from an expansion of mail services.

Shares of the company rose 4.3 percent to $70.15 in premarket trading on Wednesday after Walgreens also forecast 2018 earnings largely above Wall Street forecasts.