I have the following code and when I send an e-mail attaching a file, it shows me this message.
Send mail:
'///////////////////////////////////////////////////
myEmail.gEmailTO = txtEmailTo.Text
'///////////////////////////////////////////////////
'Asigna el nombre del archivo
lExcelFileName = myGlobalVariables.gExcelQuickSCAN & "_" & fechahoy & TimeHoy & ".xls"
' fcnExportaEntradas(lExcelFileName)
myAccess.ExportaReciboCiegoEXCEL(lQuery,lExcelFileName)
''''''''''''''''''///////////////////////////
Dim mail As SMTP
mail.Initialize(myEmail.gServerOUT,myEmail.gPortOUT,myEmail.gEmailFROM,myEmail.gEmailPassword,"mail")
mail.AddAttachment(myGlobalVariables.gSQLDataBasePath,lExcelFileName)
mail.UseSSL = True
mail.To.Add(myEmail.gEmailTO)
mail.HtmlBody = True
mail.Body = myEmail.gEmailBODY 'html.ToString
myEmail.gEmailSubject = myGlobalVariables.gSistema & " - Archivo adjunto " & lExcelFileName
mail.Subject = myEmail.gEmailSubject 'title
Dim obj As Object = mail.Send
wait for (obj) mail_MessageSent(Success As Boolean)
If Success Then
' blnSendFile = True
' 'ToastMessageShow("Enviado correctamente",False)
Msgbox2Async("Se envió el archivo excel " & lExcelFileName & " al correo: " & txtEmailTo.Text.Trim, myGlobalVariables.gSistema, "Si", "", "No", Null, False)
Wait For Msgbox_Result (Result As Int)
If Result = DialogResponse.POSITIVE Then
SalirFormulario
End If
Else
Msgbox2Async("No se pudo enviar el archivo excel: " & CRLF & LastException.Message, myGlobalVariables.gSistema, "Si", "", "No", Null, False)
Wait For Msgbox_Result (Result As Int)
If Result = DialogResponse.POSITIVE Then
SalirFormulario
End If
' blnSendFile = False
End If