anonymous Log in
Search
Recents:
v3.0
csharp-l
SMTP no envia adjunto
24/11/20 17:10

mml05621

Replies: 0

Buenas tardes desde Cuba
Necesito de su ayuda o recomendaciones.
Estoy desarrollando una rutina donde se envia correos mediante SMTP y
cuando envio los correos sin adjunto funciona bien, pero con adjunto inicia
sesion en el servidor, en la traza se ve que establece comunicacion pero se
queda colgado y nunca envia el correo como tal.
Entorno: Gx X Evo I, Generador .Net Ambiente: desktop
Servidor de correo: MDaemon 13.5
Ejemplo de la rutina:
&SMTPSession.Host = 'x.x.x.x' //nombre Server o IP
&SMTPSession.Port = 25 //puerto
&SMTPSession.Sender.Name = 'nombre'
&SMTPSession.Sender.Address = 'nombre@xx.com'
&SMTPSession.Authentication = 1
&SMTPSession.Secure = 0 //Verificar que el server soporte conexiones seguras
&SMTPSession.UserName = 'usuario'
&SMTPSession.Password = 'clave'
&SMTPSession.Login()
&MailRecipient.Address = 'yo@dominio'
&MailRecipient.Name = 'yo'
&MailMessage.To.Clear()
&MailMessage.To.Add(&MailRecipient)
&MailMessage.Subject = 'Prueba Envio de correo'
&MailMessage.Text = 'Hola Mundo!!'
&MailMessage.HTMLText = '<b> HOLA MUNDO!! </b>'
&MailMessage.Attachments.Clear()
&adjunto = 'd:\marzo.pdf'
&MailMessage.Attachments.Add(&adjunto)
//Código de error al iniciar sesión
msg(str(&SMTPSession.ErrCode) + ' '+ &SMTPSession.ErrDescription)
&SMTPSession.Send(&MailMessage)
//Código de error al enviar mail
msg(str(&SMTPSession.ErrCode) + ' envieeeeee '+ &SMTPSession.ErrDescription)
&SMTPSession.Logout()
==Traza el el servidor=========
Tue 2020-11-24 15:05:51: Session 719622; child 0002
Tue 2020-11-24 15:05:51: Accepting SMTP connection from [x.x.x.x:52697] to
[y.y.y.y:25]
Tue 2020-11-24 15:05:51: --> 220 midominio ESMTP MDaemon 13.5.1; Tue, 24
Nov 2020 15:05:51 -0500
Tue 2020-11-24 15:05:51: <-- EHLO INF-1002422
Tue 2020-11-24 15:05:51: --> 250-midominio Hello INF-1002422, pleased to
meet you
Tue 2020-11-24 15:05:51: --> 250-ETRN
Tue 2020-11-24 15:05:51: --> 250-AUTH LOGIN CRAM-MD5 PLAIN
Tue 2020-11-24 15:05:51: --> 250-8BITMIME
Tue 2020-11-24 15:05:51: --> 250-STARTTLS
Tue 2020-11-24 15:05:51: --> 250 SIZE
Tue 2020-11-24 15:05:51: <-- STARTTLS
Tue 2020-11-24 15:05:51: --> 220 Begin TLS negotiation
Tue 2020-11-24 15:05:51: SSL negotiation successful (TLS 1.0, 1024 bit key
exchange, 128 bit RC4 encryption)
Tue 2020-11-24 15:05:51: <-- EHLO INF-1002422
Tue 2020-11-24 15:05:51: --> 250-midominio Hello INF-1002422, pleased to
meet you
Tue 2020-11-24 15:05:51: --> 250-ETRN
Tue 2020-11-24 15:05:51: --> 250-AUTH LOGIN CRAM-MD5 PLAIN
Tue 2020-11-24 15:05:51: --> 250-8BITMIME
Tue 2020-11-24 15:05:51: --> 250 SIZE
Tue 2020-11-24 15:05:51: <-- AUTH LOGIN
Tue 2020-11-24 15:05:51: --> 334 VXNlcm5hbWU6
Tue 2020-11-24 15:05:51: <-- ZmFjdHVyYQ==
Tue 2020-11-24 15:05:51: --> 334 UGFzc3dvcmQ6
Tue 2020-11-24 15:05:51: <-- ******
Tue 2020-11-24 15:05:51: --> 235 Authentication successful
Tue 2020-11-24 15:05:51: Authenticated as usuario@dominio
Tue 2020-11-24 15:06:35: <-- MAIL FROM: < usuario@dominio >
Tue 2020-11-24 15:06:35: --> 250 < usuario@dominio >, Sender ok
Tue 2020-11-24 15:06:35: <-- RCPT TO: < yo@dominio >
Tue 2020-11-24 15:06:35: --> 250 < yo@dominio >, Recipient ok
Tue 2020-11-24 15:06:35: <-- DATA
Tue 2020-11-24 15:06:35: Creating temp file (SMTP):
d:\mdaemon\queues\temp\md50000013679.tmp
Tue 2020-11-24 15:06:35: --> 354 Enter mail, end with <CRLF>.<CRLF>
Alguien me puede ayudar con alguna sugerencia.
Gracias
Saludos,
Miguel Mendez
-----------------------------------------
Para Suscribirse/Desuscribirse:
http://www.gxtechnical.com/cgi-bin/hforum.exe?2,3,30,11
Por consultas owner-csharp-l@gxtech.com.uy


Back to csharp-l