Hello I have a problem with NET.SMTP AddAttachment.
The mail is sent if I omit the line with AddAttachment,
but it is not sent if I insert AddAttachment.
I have no idea why and there is no error message.
The mail is sent if I omit the line with AddAttachment,
but it is not sent if I insert AddAttachment.
I have no idea why and there is no error message.
B4X:
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