| DESCRIPTION |
AT COMMAND |
Configure Parameters of a TCP/IP Context
AT+QICSGP=<contextID>,<context_type>,<APN>,<username>,<password>, <authentication> |
AT+QICSGP=1,1,”yoodo”,””,””,0
OK |
Activate a PDP Context
AT+QIACT=<contextID> |
AT+QIACT=1
OK
AT+QIACT?
+QIACT: 1,1,1,”10.32.47.42″
OK |
Configure SSL Type
//Set the SSL type for SMTP.
AT+QSMTPCFG=”ssltype”,<ssltype> |
WITHOUT SSL
AT+QSMTPCFG=”ssltype”,0
OK
WITH SSL
AT+QSMTPCFG=”ssltype”,1
OK
AT+QSMTPCFG=”sslctxid”,1
OK
AT+QSSLCFG=”ciphersuite”,1,0xffff
OK
AT+QSSLCFG=”seclevel”,1,0
OK
AT+QSSLCFG=”sslversion”,1,1
OK |
Configure Parameters for SMTP Server
//Set the PDP context ID.
AT+QSMTPCFG=”contextid”,<contextID>
//Set the IP address or domain name and port of SMTP server.
AT+QSMTPCFG=”smtpserver”,<srvaddr>,<srvport>
//Set username and password.
AT+QSMTPCFG=”account”,<username>,<password>
//Set sender name and sender address.
AT+QSMTPCFG=”sender”,<sender_name>,<sender_email> |
AT+QSMTPCFG=”contextid”,1
OK
AT+QSMTPCFG=”smtpserver”,”smtp.example.com”,587
OK
AT+QSMTPCFG=”account”,”*username*”,”$password$”
OK
AT+QSMTPCFG=”sender”,”MOBITEK”,”add-new-post@feed.mobitek.my”
OK |
Add or Delete Recipients
AT+QSMTPDST=<mode>,<type>,<emailaddr>
Parameter:
- <mode> – Integer type. Add or delete recipients:
- <type> – Integer type. The type of recipients:
- 1 – All recipients
- 2 – CC recipients
- 3 – BCC recipients
- <emailaddr> – String type. The email address of recipients. The maximum size of the parameter is 50 bytes.
|
AT+QSMTPDST=1,1,”sales@abc.my”
OK
AT+QSMTPDST=1,2,”marketing-director@abc.com”
OK
AT+QSMTPDST?
+QSMTPDST: 1,”sales@abc.my”
+QSMTPDST: 2,”marketing-director@abc.com”
OK |
Edit the Subject of an Email
AT+QSMTPSUB=<charset>,<subject>
Parameter:
- <charset> – Integer type. The character set of the subject.
- <subject> – String type. The subject of the email. If <charset> is 0, this string will be the subject of the email. Otherwise, it is formatted as a hex string.
|
AT+QSMTPSUB=0,”TEST SMTP USING Q25″
OK
AT+QSMTPSUB?
+QSMTPSUB: 0,”TEST SMTP USING Q25″
OK |
Edit the Body of an Email
AT+QSMTPBODY=<charset>,<body_length>,<input_time>
Parameter:
- <charset> – Integer type. The character set of the body:
- 0 – ASCII
- 1 – UTF-8
- 2 – GB2312
- 3 – BIG5
- <body_length> – Integer type. The specific length of body. If the length of inputted data is less than the specific value <body_length>, customers can exit from data mode by “+++”. The actual length of the body is the inputted data length. The range is 1-10240. Unit: byte.
- <input_time> – Integer type. The maximum time to upload email body from COM port. The range is 1-65535, and the default value is 90. Unit: second.
- Type to the email body after “CONNECT” appear. The words typed will not be visible.
|
AT+QSMTPBODY=0,50,60
CONNECT
+QSMTPBODY: 37
OK |
Send an Email
AT+QSMTPPUT=<timeout>
Parameter:
- <timeout> – Integer type. The maximum time to send an email. The range is 60-65535. Unit: second.
- After “OK” response” then wait for the “+QSMTPPUT:” response. If the response is “+QSMTPPUT: 0,0” then the email sending is successful. If other number displayed in the first parameter, then the email sending has error. For example: “+QSMTPPUT: 665,0”.
|
AT+QSMTPPUT=300
OK
+QSMTPPUT: 0,0 |
Clear the Content of an Email
AT+QSMTPCLR |
AT+QSMTPCLR
OK |
Deactivate a PDP Context
AT+QIACT=<contextID> |
AT+QIDEACT=1
OK |