Craft 3 attachment email
Assuming what you're trying to attach is on the local filesystem, you can see an example of this here: https://github.com/pixelandtonic/craftnet/blob/master/src/orders/OrderBehavior.php#L160-L182

Essentially, you'd just use attachContent, but there is also an attach method:

-&gt;attachContent($pdf, [
    'fileName' =&gt; $filename,
    'contentType' =&gt; 'application/pdf',
])