Enabling the XSLT extension for use in your XSLT templates.
Add the following XML snippet to your ~/config/xsltExtensions.config
file:
<XsltExtensions>
...
<ext assembly="uComponents.XsltExtensions" type="uComponents.XsltExtensions.Email" alias="ucomponents.email" />
...
</XsltExtensions>
Here are available methods in the Email
library:
Determines whether the input is a valid email address.
Returns: true if valid; otherwise, false.
| Name | Type | Notes |
|——|——|——-|
| input | System.String
| The email address. |
<!-- Testing an email address; where 'emailAddress' is a node -->
<xsl:choose>
<xsl:when test="ucomponents.email:IsValidEmail(emailAddress)">
<p>This is a valid email address.</p>
</xsl:when>
<xsl:otherwise>
<p>This is not a valid email address.</p>
</xsl:otherwise>
</xsl:choose>
Sends an email. Performs the exact same function an umbraco.library.SendMail
, with the option of sending via SSL.
| Name | Type | Notes |
|——|——|——-|
| from | System.String
| |
| to | System.String
| |
| subject | System.String
| |
| body | System.String
| |
| isHtml | System.Boolean
| |
| useSSL | System.Boolean
| |
<xsl:value-of select="ucomponents.email:SendMail('no-reply@localhost', 'test@localhost', 'Test message', 'This is a test message.', false(), true())" />