|
dolibarr 25.0.0-alpha
|
Library to evaluate the quality of a user HTML email signature against emailing best practices. More...
Go to the source code of this file.
Functions | |
| dolCheckSignatureQuality ($html) | |
| Analyze an HTML email signature and return a quality score (0..100) against common emailing best practices: enough real text vs images, a reasonable number of images, alt text, absolute https URLs, no script/style, contact details present, no oversized fixed widths. | |
| dolGetSignatureQualityBadge ($html, $outputlangs=null) | |
| Build a ready to print HTML badge summarising the quality of an email signature, with a collapsible list of the best practices that are not met. | |
Library to evaluate the quality of a user HTML email signature against emailing best practices.
Definition in file emailsignature.lib.php.
| dolCheckSignatureQuality | ( | $html | ) |
Analyze an HTML email signature and return a quality score (0..100) against common emailing best practices: enough real text vs images, a reasonable number of images, alt text, absolute https URLs, no script/style, contact details present, no oversized fixed widths.
Thresholds can be tuned with the constants SIGNATURE_QUALITY_MAX_IMG, SIGNATURE_QUALITY_MAX_IMG_WIDTH, SIGNATURE_QUALITY_MAX_TEXT_LEN, SIGNATURE_QUALITY_MAX_LINKS and SIGNATURE_QUALITY_MIN_CHARS_PER_IMG.
| string | $html | Raw HTML content of the signature |
Definition at line 39 of file emailsignature.lib.php.
References dol_string_nohtmltag(), and getDolGlobalInt().
Referenced by dolGetSignatureQualityBadge().
| dolGetSignatureQualityBadge | ( | $html, | |
| $outputlangs = null ) |
Build a ready to print HTML badge summarising the quality of an email signature, with a collapsible list of the best practices that are not met.
| string | $html | Raw HTML content of the signature |
| ?Translate | $outputlangs | Language object for output (defaults to global $langs) |
Definition at line 242 of file emailsignature.lib.php.
References dol_escape_htmltag(), and dolCheckSignatureQuality().