Hola tengo problemas enviando correos usando aspose.mail
he comprobado la conexion y autenticacion de la cuenta y todo ok
PS C:\Users\usuario>
Test-NetConnection -ComputerName smtp-legacy.office365.com -Port 587
$SMTPServer = “smtp-legacy.office365.com”
$SMTPPort = 587
$Username = “cuenta@dominio.com”
$Password = “secreto”
$Creds = New-Object System.Net.NetworkCredential($Username, $Password)
$SMTPClient = New-Object Net.Mail.SmtpClient($SMTPServer, $SMTPPort)
$SMTPClient.EnableSsl = $true
$SMTPClient.Credentials = $Creds
Try {
$SMTPClient.Send(“cuenta@dominio.com”, “destino@dominio.com”, “Prueba SMTP”, “Este es un correo de prueba”)
Write-Host “ Autenticación exitosa y correo enviado.”
} Catch {
Write-Host “ Error: $_”
}
ComputerName : smtp-legacy.office365.com
RemoteAddress : 52.98.248.198
RemotePort : 587
InterfaceAlias : Ethernet
SourceAddress : 192.168.200.134
TcpTestSucceeded : True
Autenticación exitosa y correo enviado.
y he recibido el mail en mi cuenta ok
pero usando Aspose.Email estuvo funcionando ok hasta
mtpException: Authentication failed.
—> SmtpException: Authentication failed.
en #=zCziMTQNHSz4rmEe8EF$jStsWN5Yz5jRaZoRasRk=.#=z_3BYjg4=(String #=zQOiK3c0=, Int32 #=zOFTMBD8=)
en #=zCziMTQNHSz4rmEe8EF$jStsWN5Yz5jRaZoRasRk=.#=zLhOIA20=(String #=zQOiK3c0=, Int32 #=zOFTMBD8=)
— End of inner exception stack trace —
en #=z05W_P2p9CG2kib$U3xiTdOoXzjma.#=zRBRDInA=(IAsyncResult #=zApOEgTw=)
en #=z05W_P2p9CG2kib$U3xiTdOoXzjma.#=z5rwfmdc=()
en #=zj0Jow2BXKanIAGAs4VvDFyq5lVbYVVZ8yJW1sho=.#=zAqxt9WY=(#=zI$LMAGcEMr_pZT3FeiGESfvsrwuPuYq_RQ== #=zNcelfFM=)
en #=zT1JahWcrqgzTxZbjoWVQCMAY18o3.#=z5LSE2T02SsCC(Int32 #=zBVh0yrM=, #=zI$LMAGcEMr_pZT3FeiGESfvsrwuPuYq_RQ== #=z5Vy$uO8=, List1 #=zZhHBw$g=, Int32 #=z0uNhaVY=) en #=zT1JahWcrqgzTxZbjoWVQCMAY18o3.#=z5LSE2T02SsCC(Int32 #=z0uNhaVY=, #=zI$LMAGcEMr_pZT3FeiGESfvsrwuPuYq_RQ== #=z5Vy$uO8=, #=zlaD2aB$qQYEyTmf68biIyOk= #=z1fbsuLS1M38v, List
1 #=zZhHBw$g=)
en #=zT1JahWcrqgzTxZbjoWVQCMAY18o3.#=zdhLsqP0DOoQq(Int32 #=z0uNhaVY=, #=zI$LMAGcEMr_pZT3FeiGESfvsrwuPuYq_RQ== #=z5Vy$uO8=)
en #=z05W_P2p9CG2kib$U3xiTdOoXzjma.#=zkjPiGOMmTulB()
en #=z05W_P2p9CG2kib$U3xiTdOoXzjma.#=z8xv2_Ds=(AsyncCallback #=z_vvdhpE=, Object #=zdZ74ZC8=)
en Aspose.Email.Clients.Smtp.SmtpClient.BeginSend(IConnection connection, IEnumerable1 messages, EventHandler
1 messageSentDelegate, AsyncCallback callback, Object state)
en Aspose.Email.Clients.Smtp.SmtpClient.BeginSend(IConnection connection, IEnumerable1 messages, EventHandler
1 messageSentDelegate, AsyncCallback callback)
en Aspose.Email.Clients.Smtp.SmtpClient.Send(IConnection connection, IEnumerable`1 messages)
en Aspose.Email.Clients.Smtp.SmtpClient.Send(MailMessage message)
en AltaActuacionJudicial.enviarMail(Int64 codigoActuacion)
el error es intermitente por lo que no entiendo, salvo algun timeout que no se me indica el error
eperando sus comentarios
Gracias de antemano
Saludos
Rudi