Code: Select all
sprintf ("X-Mailer: PHP mail() function (PHP %s) at http://www.mysite.tld\n", phpversion ());For SwiftMailer 3.3.3 I did something similar, using $Swift::VERSION to obtain the current version number.
First of all, to my amazement, SwiftMailer 3.3.3 returned a version value of "3.3.2" instead of the expected "3.3.3".
But SwiftMailer 4.0.0 did not know any constant VERSION at all.
May I suggest that in a next release some method ::getVersion() be added on the main class, so that the software can always be asked to present its current version number?
Also for debugging purposes this me be helpful. (Consider a developer who made several websites, using different version of SwiftMailer over time. When a customer complains, he must be able to report what version that particular website is using.)
This is very simple and it does not affect normal operation of the software, so it may be included in the next sub-release or whatever.