CN103746902A - Sending method for Emails - Google Patents
Sending method for Emails Download PDFInfo
- Publication number
- CN103746902A CN103746902A CN201310745234.4A CN201310745234A CN103746902A CN 103746902 A CN103746902 A CN 103746902A CN 201310745234 A CN201310745234 A CN 201310745234A CN 103746902 A CN103746902 A CN 103746902A
- Authority
- CN
- China
- Prior art keywords
- sending method
- module
- communication module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention provides a sending method for Emails. The sending method for the Emails comprises the steps of setting an Email sending protocol stack in a communication module; setting Email connection parameters according to an AT (attention) command and acquiring Email data contents; calling the Email sending protocol stack to interact with an Email server through an Email sending AT command, packaging the Email data contents into a data pack, and sending the data pack to the Email server.
Description
Technical field
The present invention relates to the communication technology, especially, relate to a kind of sending method of Email.
Background technology
At present, in built-in field, some equipment may be integrated with automatic detection function, and when abnormal data is arrived in equipment Inspection, it generally can only carry out on-the-spot alarm, if just technical staff possibly cannot not known unit exception at the scene; Even if technical staff learns unit exception, it also must be reached the spot and check and the manual abnormal data of collecting.
On the other hand; Email (Electronic Mail; Email) be the conventional office means of communication of people's routine work; technical staff can regularly check Email in the course of the work conventionally, and office computer generally can be pointed out with notification technique personnel and check in time new mail when receiving new Email.Therefore, if equipment can automatically send Email to technical staff when abnormal data being detected, just can guarantee that technical staff knows in time unit exception and get abnormal data.
Yet in the prior art, even if the said equipment is built-in with communication module, it does not support the transmission of Email yet, therefore cannot realize and by Email, to technical staff, send the function of abnormal information and abnormal data.
Summary of the invention
For solving the problems of the technologies described above, the invention provides a kind of sending method of Email, it can be so that equipment can send Email automatically to report extremely.
The sending method of Email provided by the invention, is included in communication module built-in electronic mail and sends protocol stack; By AT command set Email, connect parameter and obtain e-mail data content; Utilize mail to send described in AT command calls that Email sends protocol stack and mail server carries out alternately, and described Email content data encapsulation is become to packet and sends to mail server.
In a kind of preferred embodiment of the sending method of Email provided by the invention, it is Simple Mail Transfer protocol smtp protocol stack that described Email sends protocol stack.
In a kind of preferred embodiment of the sending method of Email provided by the invention, described mail server is smtp server.
In a kind of preferred embodiment of the sending method of Email provided by the invention, describedly by AT command set Email, connect parameter and comprise: in described communication module, add parameter AT order is set, and utilize described parameter that the needed Email connection of AT command set smtp protocol parameter is set.
In a kind of preferred embodiment of the sending method of Email provided by the invention, described Email connects the addresses of items of mail that parameter comprises mail server address, transmit port, transmit leg addresses of items of mail and recipient.
In a kind of preferred embodiment of the sending method of Email provided by the invention, the described e-mail data content of obtaining comprises: utilize above-mentioned Mail Contents to import AT order serial ports and obtain Email content data, and described Email content data importing is arrived to described communication module.
In a kind of preferred embodiment of the sending method of Email provided by the invention, described Email content data comprise e-mail text and the Email attachment content-data setting in advance.
In a kind of preferred embodiment of the sending method of Email provided by the invention, describedly utilize mail to send described in AT command calls Email to send protocol stack and comprise alternately with mail server: utilize mail transmission AT order to call the socket interface of the inside smtp protocol stack of described communication module, and be connected with described mail server by described socket interface.
In a kind of preferred embodiment of the sending method of Email provided by the invention, described described Email content data encapsulation is become to packet and sends to mail server to comprise: after connecting between described communication module and described mail server, by described e-mail data content with and described Email be connected parameter and be packaged into e-mail data bag, and the conditional code of returning according to described mail server, sends described e-mail data bag to described mail server.
In a kind of preferred embodiment of the sending method of Email provided by the invention, described communication module is the combination in any of one of gsm module, GPRS module, GSM/GPRS module, WCDMA module, TD-SCDMA module, TD-LTE module, FDD-LTE module or above-mentioned module.
Sending method at Email provided by the invention, communication module can realize by AT order the automatic transmission of Email, therefore when abnormal data is arrived in equipment Inspection, can pass through email notification technical staff abnormal conditions, thereby assurance technical staff can be known abnormal conditions in the very first time quickly and easily.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing of required use during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also according to these accompanying drawings, obtain other accompanying drawing, wherein:
Fig. 1 is the schematic flow sheet of a kind of embodiment of sending method of Email provided by the invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only a part of embodiment of the present invention, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making all other embodiment that obtain under creative work prerequisite, belong to the scope of protection of the invention.
The invention provides a kind of sending method of Email, in described method, communication module can be commonly referred to as AT order by noting (Attention) order, realizes simply and easily the transmission of Email.Particularly, for supporting Email to send, technical scheme provided by the invention can be at the inner related protocol stack that increases Email transmission of communication module, such as SMTP (Simple Mail Transfer Protocol, Simple Mail Transfer protocol), and pre-configured a plurality of AT command interface, communication module only need to be called corresponding AT order just can complete the transmission of Email quickly and easily.
Particularly, the communication module that the present embodiment relates to can comprise following AT command interface:
(1) parameter arranges AT order, for mail server address, transmit port, transmit leg addresses of items of mail and recipient's the Emails such as addresses of items of mail are set in communication module, is connected parameter information;
(2) Mail Contents obtains AT order, for obtain text and the attachment content of Email by serial ports;
(3) mail sends AT order, carries out alternately, and Email content data encapsulation is become to packet and sends to mail server for calling internal agreement stack and mail server.
In specific embodiment, described communication module can be global system for mobile communications (Global System for Mobile Communications, GSM) module, general packet radio service technology (General Packet Radio Service, GPRS) module, or the GSM/GPRS module of while integrated GSM and GPRS function; Or, described communication module can be also 3G (Third Generation) Moblie module, such as Wideband Code Division Multiple Access (WCDMA) (Wideband Code Division Multiple Access, WCDMA) synchronous CDMA (Code Division Multiple Access) (Time Division Synchronous Code Division Multiple Access, TD-SCDMA) module of module or time-division; Or, described communication module can be also the 4th third-generation mobile communication module, such as timesharing Long Term Evolution (Time Division Long Term Evolution, TD-LTE) module or Frequency Division Duplexing (FDD) Long Term Evolution (Frequency Division Duplexing Long Term Evolution, FDD-LTE) module; Or described communication module can be also combination in any of above-mentioned module etc.
The sending method of below introducing Email provided by the invention, refers to Fig. 1, the schematic flow sheet of a kind of embodiment of sending method that it is Email provided by the invention.The sending method of described Email relates generally to the inter-process flow process of communication module, and it comprises the following steps:
Step S11, arranges AT command set Email by parameter and connects parameter;
Particularly, can add above-mentioned parameter in described communication module in this step AT order is set, the needed Email of smtp protocol is set and connects parameter, wherein, described Email connection parameter can comprise mail server address, transmit port, transmit leg addresses of items of mail and recipient's addresses of items of mail etc.
Step S12, utilizes Mail Contents to obtain AT order and obtains Email content data from serial ports;
Particularly, in this step, described communication module can utilize above-mentioned Mail Contents to import AT order, obtains the Email content data such as the text of Email and Email attachment content-data, and described Email content data importing is arrived to described communication module from serial ports.
Step S13, utilizes mail to send AT command calls internal agreement stack and mail server carries out alternately, and e-mail data content is packaged into packet and sends to mail server.
Particularly, api interface and mail server (such as smtp server) that described communication module can send the smtp protocol stack of AT command calls inside modules by mail carry out alternately, to realize mail, send.Such as, in one embodiment, first described communication module can be utilized above-mentioned mail to send AT order and call the socket interface of inner smtp protocol stack, and is connected with described mail server by described socket interface; After connecting between described communication module and described mail server, thereby described communication module can be further by described e-mail data content with and by the Email that above-mentioned parameter arranges AT command set, be connected parameter package group bag and form e-mail data bag, and the conditional code of returning according to described mail server, to described mail server, send described e-mail data bag, thereby realize mail transmission.
The sending method of Email described above goes for equipment and automatically reports abnormal scene, particularly, device interior is integrated can communication module as above, and the Email that described communication module can be in advance arranges described in AT command set step S1 by parameter connects parameter.When abnormal data is arrived in equipment Inspection, described communication module can be obtained AT order by Mail Contents and get pre-configured text and described abnormal data, and using the described text setting in advance and described abnormal data respectively as mail text and Email attachment content-data.Then, described communication module can send AT order by mail and carrys out packaging electronic mail data bag and call socket interface and mail server carries out alternately, realizing Email and automatically sending.Thus, technical staff just can receive the Email that equipment sends automatically, and in the very first time, knows abnormal conditions quickly and easily by described Email.
The foregoing is only embodiments of the invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes specification of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical field, be all in like manner included in scope of patent protection of the present invention.
Claims (10)
1. a sending method for Email, is characterized in that, comprising:
At communication module built-in electronic mail, send protocol stack;
By AT command set Email, connect parameter and obtain e-mail data content;
Utilize mail to send described in AT command calls that Email sends protocol stack and mail server carries out alternately, and described Email content data encapsulation is become to packet and sends to mail server.
2. the sending method of Email as claimed in claim 1, is characterized in that, it is Simple Mail Transfer protocol smtp protocol stack that described Email sends protocol stack.
3. the sending method of Email as claimed in claim 2, is characterized in that, described mail server is smtp server.
4. the sending method of Email as claimed in claim 3, it is characterized in that, describedly by AT command set Email, connect parameter and comprise: in described communication module, add parameter AT order is set, and utilize described parameter that the needed Email connection of AT command set smtp protocol parameter is set.
5. the sending method of Email as claimed in claim 4, is characterized in that, described Email connects the addresses of items of mail that parameter comprises mail server address, transmit port, transmit leg addresses of items of mail and recipient.
6. the sending method of Email as claimed in claim 3, is characterized in that, described in obtain e-mail data content and comprise:
Utilize above-mentioned Mail Contents to import AT order serial ports and obtain Email content data, and described Email content data importing is arrived to described communication module.
7. the sending method of Email as claimed in claim 6, is characterized in that, described Email content data comprise e-mail text and the Email attachment content-data setting in advance.
8. the sending method of Email as claimed in claim 3, is characterized in that, the described mail that utilizes sends described in AT command calls that Email sends protocol stack and mail server comprises alternately:
Utilize mail to send AT order and call the socket interface of the inside smtp protocol stack of described communication module, and be connected with described mail server by described socket interface.
9. the sending method of Email as claimed in claim 8, is characterized in that, described described Email content data encapsulation is become to packet and sends to mail server to comprise:
After connecting between described communication module and described mail server, by described e-mail data content with and described Email be connected parameter and be packaged into e-mail data bag, and the conditional code of returning according to described mail server, sends described e-mail data bag to described mail server.
10. the sending method of Email as claimed in any one of claims 1-9 wherein, it is characterized in that, described communication module is the combination in any of one of gsm module, GPRS module, GSM/GPRS module, WCDMA module, TD-SCDMA module, TD-LTE module, FDD-LTE module or above-mentioned module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310745234.4A CN103746902A (en) | 2013-12-30 | 2013-12-30 | Sending method for Emails |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310745234.4A CN103746902A (en) | 2013-12-30 | 2013-12-30 | Sending method for Emails |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103746902A true CN103746902A (en) | 2014-04-23 |
Family
ID=50503893
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310745234.4A Pending CN103746902A (en) | 2013-12-30 | 2013-12-30 | Sending method for Emails |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103746902A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104581653A (en) * | 2014-12-08 | 2015-04-29 | 深圳市广和通实业发展有限公司 | Method for receiving E-mails by using AT command |
CN104660493A (en) * | 2015-02-10 | 2015-05-27 | 深圳市中兴移动通信有限公司 | Connection processing method and device for mailbox client and email server |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1501629A (en) * | 2002-11-15 | 2004-06-02 | 鸿富锦精密工业(深圳)有限公司 | Network equipment management system and method through E-mail |
US20060155810A1 (en) * | 2002-11-14 | 2006-07-13 | Paul Butcher | Method and device for electronic mail |
CN102026111A (en) * | 2009-09-11 | 2011-04-20 | 希姆通信息技术(上海)有限公司 | Method for transceiving mails by using wireless communication module |
CN102523176A (en) * | 2006-12-21 | 2012-06-27 | 江国庆 | Computer device with audio-video email system and communication method thereof |
-
2013
- 2013-12-30 CN CN201310745234.4A patent/CN103746902A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060155810A1 (en) * | 2002-11-14 | 2006-07-13 | Paul Butcher | Method and device for electronic mail |
CN1501629A (en) * | 2002-11-15 | 2004-06-02 | 鸿富锦精密工业(深圳)有限公司 | Network equipment management system and method through E-mail |
CN102523176A (en) * | 2006-12-21 | 2012-06-27 | 江国庆 | Computer device with audio-video email system and communication method thereof |
CN102026111A (en) * | 2009-09-11 | 2011-04-20 | 希姆通信息技术(上海)有限公司 | Method for transceiving mails by using wireless communication module |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104581653A (en) * | 2014-12-08 | 2015-04-29 | 深圳市广和通实业发展有限公司 | Method for receiving E-mails by using AT command |
CN104660493A (en) * | 2015-02-10 | 2015-05-27 | 深圳市中兴移动通信有限公司 | Connection processing method and device for mailbox client and email server |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103312625B (en) | A kind of method and system of network service | |
US9143253B2 (en) | Techniques for delivering emergency payloads for non-voice emergency services | |
CN103200542B (en) | Information prompting method, device and terminal | |
CN106231637A (en) | Secondary cell alternative approach, device and base station | |
CN101442720A (en) | Terminal and automatic return receipt method for message | |
EP2043312A1 (en) | Communication terminal, mail push system and method thereof | |
EP2400785A1 (en) | Method for auto-replying with a mobile phone short message | |
CN104869560A (en) | Message notification method, message notification device, mobile equipment and message notification system | |
CN104518943A (en) | Method and system for e-mail management | |
CA2698087A1 (en) | Method and system for filtering electronic messages | |
CN102547614B (en) | A kind of automatic reminding method based on mobile phone and mobile phone | |
CN102932533B (en) | Method and device for third party application program to call contacts | |
CN103746902A (en) | Sending method for Emails | |
CN102131184A (en) | Mobile phone and received message processing method thereof | |
CN102421073B (en) | Method and device for processing short message | |
CN101800953A (en) | Method and system for realizing self-adaption mail configuration | |
CN103369474B (en) | Crosstalk reminding method and device | |
CN103369114A (en) | Short message sending method, short message sending device and mobile communication terminal | |
CN102158584A (en) | Method, device and system for automatically identifying phone number of communication initiator | |
CN105635497A (en) | Terminal call transfer method and call transfer terminal | |
CN103927646A (en) | Information processing method and electronic equipment | |
CN105577967A (en) | Incoming call reminding device in shutdown state of mobile terminal and method thereof | |
CN104092832A (en) | Short message sending method of dual-card dual-standby mobile phone | |
CN101931909A (en) | Method and system for generating and acquiring information of 3G terminal and 3G terminal thereof | |
CN204696438U (en) | A kind of junctor automatically |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C53 | Correction of patent of invention or patent application | ||
CB02 | Change of applicant information |
Address after: 518052, A, building two, phase 1057, science and technology building, Nanhai Road, Shenzhen, Guangdong, Nanshan District, China 501A Applicant after: FIBOCOM WIRELESS INC. Address before: 518052, A, building two, phase 1057, science and technology building, Nanhai Road, Shenzhen, Guangdong, Nanshan District, China 501A Applicant before: Shenzhen G&T Industrial Development Co., Ltd. |
|
COR | Change of bibliographic data |
Free format text: CORRECT: APPLICANT; FROM: SHENZHEN G+T INDUSTRIAL DEVELOPMENT CO., LTD. TO: SHENZHEN FIBOCOM WIRELESS INC. |