Skip to main content

remove_extra_commas()

public static function remove_extra_commas( $email )

Strip extra commas from email headers.

If an email field has multiple merge tags, and not all of the fields are filled out, we can end up with extra commas that break the header. This method also accounts for removal of surrounding spaces.

Since: 2.8.6

Source: common.php:2213

Parameters

NameTypeDefaultDescription
$email

Returns

  • string