Dim Mail As SMTP
Mail.Initialize( MailServer, MailPort, MailUserName, MailPassword, "SMTP") ' <-- a gmail.com account ###
Mail.AuthMethod = Mail.AUTH_LOGIN
Mail.UseSSL = konto.UseSSL
Mail.StartTLSMode = konto.UseTLS
Mail.Sender = MailSender
Mail.To.Add( ToEmail)
Mail.Subject = Title
Mail.Body = EmailText
File.WriteString( File.DirInternal, "Test.txt", EmailText)
Mail.AddAttachment( File.DirInternal, "Test.txt") '<-- if I insert this line NO mail will be sent ###
Mail.Send
Wait For SMTP_MessageSent( GetSuccess As Boolean)
If GetSuccess Then
End If