email SMTP mail not sent (error 102)

Hi guys!
I´ve got the following code to send invoices to our clients.
It works fine except with one of our clients. when trying to send it allways rejects the email and i get an email in my inbox with error “ADRESS NOT FOUND”.
from chrome, in gmail i send emails to that same clients address and no problem is present, the email is sent correctly. not like that from my xojo application.
any clues why i can not send it to this client?
in every email i send, at the end, i get the code error 102, even if it sends it correctly or not.

dim em as new EmailMessage
dim file as new EmailAttachment
dim rs as recordSet
dim emailCliente, s, auxStr As String
dim i As Integer

      emailCliente = ""

em = New EmailMessage
em.FromAddress = ""  //""
em.Subject = "APPSA - CFDI " + VentaSerie.Text + VentafolioPapelFactura.Text
em.BodyPlainText = "Se anexa comprobante fiscal digital." + EndOfLine  + "Que tenga un excelente día!"
em.headers.AppendHeader "X-Mailer","Envio de CFDI a clientes"

// add recipients
s = ReplaceAll(emailCliente, ",", Chr(13))
s = ReplaceAll(s, Chr(13)+Chr(10), Chr(13))
For i = 1 To CountFields(s, Chr(13))
  auxStr = ("<" + Trim(NthField(s, Chr(13), i)) + ">")
  em.AddRecipient("<" + Trim(NthField(s, Chr(13), i)) + ">")

MailSocket.Address =""
MailSocket.Port = 465
MailSocket.ConnectionType = SMTPSecureSocket.TLSv12
MailSocket.SMTPConnectionMode = SMTPSecureSocket.ModeSSLTLS
MailSocket.Secure = True
MailSocket.Username = "abastecedora2017"  //"abastecedora2017"
MailSocket.Password = XXXX

// add attachments
file = New EmailAttachment
file.LoadFromFile(GetFolderItem("C:\\APP\\RegistroCFDI\" + VentaFolioPapelFactura.Text + ".xml"))
file = New EmailAttachment
file.LoadFromFile(GetFolderItem("C:\\APP\\RegistroCFDI\" + VentaFolioPapelFactura.Text + ".pdf"))

// send the email

102 isn’t necessarily related to the problem you’re having with that one client. 102 simply means “lost connection” but this may not be an actual error condition, the socket may simply have disconnected as normal when its work is done.

BTW, you may want to obfuscate those email addresses in your post, if you haven’t already.

That doesn’t look right, try it without those “<” and “>”.

Gavin, thanks for you reply, but what exactyly do you mean bu obfuscating that adderess?

Max, thanks, i already tried with and without the “<” and “>”. but it makes no difference at all.

any other lue why this email address is rejecting every single email i send to it via xojo?

I think the obfuscate comment is because clear text email will soon be found by bots and you may get a lot of spam.

The email you have here for your client, doesn’t exist. I’m filling the form at gmail to create a new email with that and it doesn’t say is in use (if I put another email that exists in gmail I get a warning: That username is taken).

Check if the first part is correct or if it in fact is from and not other service.

Alberto, thank you for the comment. I verified the email account inside an email validator webpage, and as a result i get : “The mailbox for the e-mail address does not exist.”
The thing is that when i send an email to that same account, not from XOJO, but from chrome and gmail, the email gets sent and delivered correctly, this confirmed by my client.
I requested sent emails to verify email is correct, thank you.

Vadir, I sent you a private message with more information. This thread is public, maybe you should remove the email address from you and your client.

Is allow less secure applications enabled in the account?

I think the username is the full email address, not only the “user” part.