TSL语言基础 > Object TSL > TSL内置对象使用大全 > SMTP对象 > SMTP对象的方法

SendCmd    

简述

发送命令。
定义
SendCmd(Cmd:String;[Var CmdResult:String;Var RetCode:String]):Boolean;
参数
名称类型说明
CmdString字符串类型,发送的命令。
CmdResultString可选参数,返回的结果串。
RetCodeString可选参数,返回的代码串。
  • 范例


    //发送HELO命令。
    obj:= CreateObject("smtp") ;
    obj.Host := 'smtp.tinysoft.com.cn' ;
    obj.connect();
    obj.sendcmd("HELO smtp.tinysoft.com.cn\r\n",r,c);
    return r;
    //结果:665518 Hello smtp.tinysoft.com.cn [ip], pleased to meet you.
      
相关