Recital 47 (
https://gdpr-info.eu/recitals/no-47/) explicitly states:
"The processing of personal data for direct marketing purposes may be regarded as carried out for a legitimate interest."
It's also mentioned in Article 21 describing the right to object to processing using legitimate/public interest:
"Where personal data are processed for direct marketing purposes, the data subject shall have the right to object at any time… etc."
The ICO has some useful guidance on when it is an appropriate basis: https://ico.org.uk/for-organisations/guide-to-data-protectio...