Convert addresses from name <address@domain.tld> to phpmailer format
问题 We have been using PEAR Mail but as this hasn't been maintained for a while I am wanting to convert to PHPmailer instead. We have an existing email class which wraps the actual mailer so conversion isn't looking too difficult so far. The problem I have run into is that our existing sendEmail method expects email addresses as a string like display name <address@domain.tld>, another display name <address2@domain.tld> Whereas PHPmailer takes each address in turn and passes the address and the