/**
 * Add an attachment to the mail
 *
 * @param   string  $name  Filename of the attachment
 * @param   string  $file  Either a filepath or filecontent
 *
 * @return  void
 *
 * @since   4.0.0
 */
public function addAttachment($name, $file)
{
    $attachment = new \stdClass();
    $attachment->name = $name;
    $attachment->file = $file;
    $this->attachments[] = $attachment;
}