Actually I found a workaround. Sharing is caring :)
I use a part of robocopy, which is for logfiles but can send txt aswell.
Howeever this is my script
Send E-mail message with log file attachment
$Message = New-Object Net.Mail.MailMessage($EmailFrom, $EmailTo, $EmailSubject, $EmailBody)
$Attachment = New-Object Net.Mail.Attachment($Logfile, 'text/plain')
$Message.Attachments.Add($Attachment)
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, $SMTPPort)
If (-not $SMTPPort -eq "25"){
$SMTPClient.EnableSsl = $true;
$SMTPClient.Credentials = New-Object System.Net.NetworkCredential($Username, $Password);
}
$SMTPClient.Send($Message)