SET_SMTP  dmindex
Purpose To set the SMTP address of this PLC's built-in Ethernet port using the parameters stored in DM[dmindex] to DM[dmindex+4].
Examples DM[100] = 192
DM[101] = 168
DM[102] = 1
DM[103] = 101
DM[104] = 587

SET_SMTP 100   ' set the SMTP address to 192.168.1.101:587

SETSYSTEM 252,0 ' required for Nano-10 and FMD PLCs

RESTART ' power cycle the PLC 

Comments:
  • To change the SMTP address of a PLC's ethernet port, you can load the new SMTP address and port number into the variables DM[100] to DM[104]  (e.g. from a HMI panel) and then invoke a function that runs SET_SMTP 100 to write the new SMTP address into the PLC.
  • For Nano-10 and FMD PLCs,  you should backup the new SMTP in FLASH (using the SETSYSTEM 252,0 command) and restart (cold boot) the PLC after changing the SMTP address so that the new SMTP address will be saved into the virtual EEPROM. This is not required for Fx PLCs.
  • The PLC will only assume the new SMTP address after it has been rebooted (via the RESTART command or power-on reset).
  • This is applicable to all models.
  • This command is ignored by i-TRiLOGI  simulator.
See Also GET_SMTP, SET_DNS, SET_GATEWAY, SET_IPAddr, SET_SUBNET

backbutton.gif (507 bytes)  Basic to TBASIC Reference Manual