framework/helpers/BaseHtml.php
public static function mailto($text, $email = null, $options = [])
    {
        $options['href'] = 'mailto:' . ($email === null ? $text : $email);
        return static::tag('a', $text, $options);
    }
public static function mailto($text, $email = null, $options = [])
    {
        $options['href'] = 'mailto:' . ($email === null ? $text : $email);
        return static::tag('a', $text, $options);
    }
public static function mailto ( $ text , $ email = null , $ options = [ ] ) { $ options [ 'href' ] = 'mailto:' . ( $ email === null ? $ text : $ email ) ; return static :: tag ( 'a' , $ text , $ options ) ; }
Generates a mailto hyperlink.
@param string $text link body. It will NOT be HTML-encoded. Therefore you can pass in HTML code
such as an image tag. If this is coming from end users, you should consider [[encode()]]
it to prevent XSS attacks.
@param string $email email address. If this is null, the first parameter (link body) will be treated
as the email address and used.
@param array $options the tag options in terms of name-value pairs. These will be rendered as
the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
If a value is null, the corresponding attribute will not be rendered.
See [[renderTagAttributes()]] for details on how attributes are being rendered.
@return string the generated mailto link
Generates a mailto hyperlink .