Ver Mensaje Individual
  #5  
Antiguo 10-02-2016
bitbow bitbow is offline
Miembro
 
Registrado: jul 2006
Posts: 366
Reputación: 18
bitbow Va camino a la fama
Listo!!!!


Revisando tu funcion, le hice algunos ajuste (ya despues vi que Ñuño Martínez te sugirio previamente el cambio).

Asi funciona perfecto >>

Código Delphi [-]
function SendMail(User, Password,MailFrom, MailTo,SMTPHost, SMTPPort: string;MailData: string): Boolean;
var
  SMTP: TSMTPSend;
  sl:TStringList;
begin
  Result:=False;
  SMTP:=TSMTPSend.Create;
  sl:=TStringList.Create;
  try
    sl.text:=Maildata;
    SMTP.UserName:=User;
    SMTP.Password:=Password;
    SMTP.TargetHost:=SMTPHost;
    SMTP.TargetPort:=SMTPPort;
    SMTP.AutoTLS:=true;   //cuando comento esta linea y uso el puerto 25 si me logea
    if Trim(SMTPPort)<>'25' then
      SMTP.FullSSL:=true; // if sending to port 25, don't use encryption
    if SMTP.Login then
    begin
      SMTP.MailFrom(MailFrom, Length(MailFrom));
      SMTP.MailData(sl);
      result:= SMTP.MailTo(MailTo);
      SMTP.Logout;
    end;
  finally
    SMTP.Free;
    sl.Free;
  end;
end;

Lastima que procedimiento de envio sigue fallando.

Saludos.
__________________
¡Ni como ayudarte Niño!!
bitbow
Responder Con Cita