SMTP_PRI, SMTP_SEC

 

Description

Get or Set the SMTP primary and secondary servers configurations.

There are two SMTP mail servers for device to send email. The device will use the primary SMTP server first if it is enabled. If the device failed to connect to the primary SMTP mail server, it will try the secondary SMTP mail server. If the device successes in sending email through the primary SMTP server, it will not send the email again through secondary SMTP mail server.

Because login account name and password are in SMTP server configurations, the user level account could not access this URL. The error message, ERROR: not authorized, will be returned if the user account uses this URL.

Input Argument

state,auth,name,password,sender,server,SmtpPort,PopPort,timer
where
  state : state of the SMTP Server. 0:Disable, 1:Enable. If it is disable, the device will not send email through this server.
  auth : the method of authentication. There are many kinds of method of authentication between the device and server. User has to check what kind of authentication method is used in his SMTP mail server. Here is the list of available authentication methods.
value in auth description note
0 None No SMTP authentication is taken when establish the SMTP session
1 AUTO New authentication available in PlatformA firmware 3.13 and PlatformT firmware 4.09.
Device will detect the authentication method of SMTP server to handle the authentication by itself.
2 Login  
3 Plain  
4 Cram MD5  
5 Digest MD5  
6 POP Relay this authentication method could not be auto detected.
  name : the user name to login the SMTP mail server. The maximum length is 63
  password : the user password to login the SMTP mail server. The maximum length is 31.
  sender : The sender's email address. The maximum length is 63.
  server : the address of the SMTP mail server. The maximum length is 31.
  SmtpPort : the port number of the SMTP mail server. The default is 25.
  PopPort : The port number of the POP3 server. The default is 110. This is used if the auth is 5.
  timer : the maximum time in second to connect to the SMTP server. It could be from 0 ~ 300.
If it is 0, the connection timer is disable. The device will attempt to connect the SMTP server unless something wrong during the connection.
The error message will be returned if the length of any input argument is longer than the maximum length.

Attribute

Return of Message

SMTP_PRI='1,1,name,pwd,myaddr@mail.com,smpt1.mail.com,25,110,10'

SMTP_SEC='1,1,name,pwd,myaddr@mail.com,smpt2.mail.com,25,110,10'

OK: SMTP_PRI='1,1,name,pwd,myaddr@mail.com,smpt1.mail.com,25,110,10'
or
ERROR: SMTP_PRI='1,1,name,pwd,myaddr@mail.com,smpt1.mail.com,25,110,10'

OK: SMTP_PRI='1,1,name,pwd,myaddr@mail.com,smpt1.mail.com,25,110,10'
or
ERROR: SMTP_PRI='1,1,name,pwd,myaddr@mail.com,smpt2.mail.com,25,110,10'

Applicability

Status

Valid

See Also

EVENT_RSPMSGn, EVENT_RSPIMGn

Example

http://ip:port/cgi-bin/encoder?USER=Admin&PWD=123456&SMTP_PRI&SMTP_SEC
or
http://ip:port/cgi-bin/cmd/encoder?SMTP_PRI&SMTP_SEC

http://ip:port/cgi-bin/encoder?USER=Admin&PWD=123456&SMTP_PRI=1,1,name,pwd,myaddr@mail.com,smpt1.mail.com,25,110,10
or
http://ip:port/cgi-bin/cmd/encoder?SMTP_PRI=1,1,name,pwd,myaddr@mail.com,smpt1.mail.com,25,110,10

http://ip:port/cgi-bin/encoder?USER=Admin&PWD=123456&SMTP_SEC=1,1,name,pwd,myaddr@mail.com,smpt2.mail.com,25,110,10
or
http://ip:port/cgi-bin/cmd/encoder?SMTP_SEC=1,1,name,pwd,myaddr@mail.com,smpt2.mail.com,25,110,10

Back to

HOME, ENCODER CGI