Movatterモバイル変換


[0]ホーム

URL:


CN103426079A - Mail sending method and device - Google Patents

Mail sending method and device
Download PDF

Info

Publication number
CN103426079A
CN103426079ACN2012102046937ACN201210204693ACN103426079ACN 103426079 ACN103426079 ACN 103426079ACN 2012102046937 ACN2012102046937 ACN 2012102046937ACN 201210204693 ACN201210204693 ACN 201210204693ACN 103426079 ACN103426079 ACN 103426079A
Authority
CN
China
Prior art keywords
mail
template
sent
send
mode
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
Application number
CN2012102046937A
Other languages
Chinese (zh)
Inventor
缪贵海
张东涛
张丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by ZTE CorpfiledCriticalZTE Corp
Priority to CN2012102046937ApriorityCriticalpatent/CN103426079A/en
Priority to PCT/CN2013/075968prioritypatent/WO2013189223A1/en
Publication of CN103426079ApublicationCriticalpatent/CN103426079A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The invention provides a mail sending method and a mail sending device. The method includes the following steps that: configuration files are loaded, wherein the configuration files comprises a template engine; the template engine is adopted to call a mail template corresponding to a mail to be sent; and the mail template is adopted to generate the mail to be sent, and the mail to be sent is sent out. With the mail sending method and the mail sending device adopted, problems such as high redundancy of codes, and increase of workload of developers and maintenance cost which are caused by the sending of personalized mails can be solved, and correspondingly, the redundancy of the codes can be reduced, and the workload of the developers and the maintenance cost can be decreased.

Description

E-mail sending method and device
Technical field
The present invention relates to the communications field, in particular to a kind of e-mail sending method and device.
Background technology
Sending mail is internet commercial websites common function, and for example, registered user's mailbox activates, service propelling information, business activity ad distribution etc.Different functions, need to send different mails.Most people, especially company, all want the information of own company is sent to the old and new customers of oneself with the form of personalized mail, is by website, to show qualification and the strength of company can increase business contact on the other hand on the one hand.For the demand that meets the user and send personalized mail, in correlation technique, be all the style for different mail in the past, need the different java code of exploitation to meet service needed, thereby, cause code redundancy high, increased developer's workload and maintenance cost.
For above-mentioned problem one of at least in correlation technique, effective solution is not yet proposed at present.
Summary of the invention
The invention provides a kind of e-mail sending method and device, at least to solve in correlation technique workload and the maintenance cost problem that the code redundancy that sends personalized mail and cause is high, increase the developer.
According to an aspect of the present invention, provide a kind of e-mail sending method, it comprises: loading configuration file, and wherein, configuration file comprises: template engine; Adopt template engine to call the mail template that mail to be sent is corresponding; Use the mail template generate mail to be sent and send.
Preferably, adopting before template engine calls the mail template that mail to be sent is corresponding, above-mentioned e-mail sending method also comprises: the mail template that the interval predetermined period more sets in advance in new database.
Preferably, adopting template engine to call the mail template corresponding with mail to be sent comprises: adopt template engine to call the mail template corresponding with mail to be sent from the mail template set in advance.
Preferably, using the mail template to generate mail to be sent and send comprises: by configuration file, for the information that sends mail to be sent, being filled up to the mail template, generating mail to be sent and send.
Preferably, using the mail template to generate mail to be sent and send comprises: select the send mode be complementary with email type to be sent to send mail to be sent.
Preferably, send mode comprises: send the mode of the mail of the mode of template mail, the mode that sends text-mail, transmission webpage format, the mode that transmission includes the webpage format mail of picture or annex.
Preferably, before loading configuration file, above-mentioned e-mail sending method also comprises: send mode is detected, determine that send mode is normal.
According to a further aspect in the invention, provide a kind of mail dispensing device, it comprises: load-on module, and for loading configuration file, wherein, configuration file comprises; Template engine; Calling module, call for adopting template engine the mail template that mail to be sent is corresponding; Sending module, generate mail to be sent and send for using the mail template.
Preferably, above-mentioned mail dispensing device also comprises: update module, and for the interval predetermined period mail template that more new database sets in advance.
Preferably, above-mentioned mail dispensing device also comprises: detection module, for the mode to sending mail to be sent, detected, and determine that send mode is normal.
In the present invention, pass through loading configuration file, load template engine, and adjust and the mail template corresponding with mail to be sent by this template engine, then, use above-mentioned mail template to generate mail to be sent, and mail to be sent is sent, realized can be different according to the user demand call different mail templates by template engine, to generate different mails, when meeting the multiple demand of user, use due to template engine, the problem that all needs exploitation code while having avoided the mail of each transmission different-style, thereby reduced code redundancy, reduced developer's workload, reduced maintenance cost.
The accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, forms the application's a part, and schematic description and description of the present invention the present invention does not form inappropriate limitation of the present invention for explaining.In the accompanying drawings:
Fig. 1 is the process flow diagram according to the e-mail sending method of the embodiment of the present invention;
Fig. 2 is the structured flowchart according to the mail dispensing device of the embodiment of the present invention;
Fig. 3 is the structured flowchart according to the another kind of mail dispensing device of the embodiment of the present invention;
Fig. 4 is the structured flowchart according to another mail dispensing device of the embodiment of the present invention;
Fig. 5 is the transmission according to the embodiment of the present invention, the environment schematic diagram of reception mail; And
Fig. 6 sends the schematic diagram of mail method according to the another kind of the embodiment of the present invention.
Embodiment
Hereinafter with reference to accompanying drawing, also describe the present invention in detail in conjunction with the embodiments.It should be noted that, in the situation that do not conflict, embodiment and the feature in embodiment in the application can combine mutually.
In the present embodiment, provide a kind of e-mail sending method, as shown in Figure 1, this e-mail sending method comprises that step S102 is to step S106.
Step S102: loading configuration file, wherein, configuration file comprises: template engine.
Step S104: adopt template engine to call the mail template that mail to be sent is corresponding.
Step S106: use the mail template generate mail to be sent and send.
Pass through above-mentioned steps, at first loading configuration file, load template engine, and adjust and the mail template corresponding with mail to be sent by this template engine, then, use above-mentioned mail template to generate mail to be sent, and mail to be sent is sent, realized can be different according to the user demand call different mail templates by template engine, to generate different mails, when meeting the multiple demand of user, use due to template engine, the problem that all needs exploitation code while having avoided the mail of each transmission different-style, thereby reduced code redundancy, reduced developer's workload, reduced maintenance cost.
Preferably, above-mentioned e-mail sending method can realize in the following manner, based on spring+velocity+javamail, realize, wherein, Spring Framework is the application framework of a Java/Java EE global function stack (full-stack) of increasing income, with the issue of Apache licence form, the transplanting version on the .NET platform is also arranged.This framework is based on Expert One-on-One Java EE Design and Development(ISBN 0-7645-4385-7) code in a book, at first by exploitations such as Rod Johnson and Juergen Hoeller.Spring Framework provides an easy development scheme, and this development scheme, by a large amount of property files and help class of avoiding those may cause bottom code to become numerous and diverse confusion.
Velocity is a template engine (template engine) based on java.It allows anyone only simply to use template instruction (template language) to quote the object by the java code definition.When Velocity is applied to the web exploitation, the interface personnel can synchronously develop a web website of following the MVC framework with java program development personnel, that is to say, the Pages Design personnel can only pay close attention to the display effect of the page, and pay close attention to the service logic coding by java program development personnel.Velocity separates the java code from web page, for the long-time maintenance of web website, provides convenience like this, and a kind of optional scheme also is provided again outside JSP and PHP for us simultaneously.
The exploitation of Java Mail API is that SUN provides public API framework for Java developer.The simple tool that this API can yet be regarded as and adds healthy and strong mail/communication to support in application program.
By the way, can use spring+velocity+javamail to realize loading different templates, realize the transmission of personalized mail, when meeting consumers' demand fast, can reduce code redundancy.
Meet the demand of different user in order to obtain in real time various mail template, in this preferred embodiment, adopting before template engine calls the mail template that mail to be sent is corresponding the mail template that the interval predetermined period more sets in advance in new database.Can the predetermined period of different length be set according to the needs that upgrade, realization can be upgraded the template in template base in real time, so that the mail template that quick obtaining needs; In addition, without restarting server, just can be loaded into different mail templates, be convenient to expansion, improve the dirigibility of system.
The step that above-mentioned employing template engine calls the mail template corresponding with mail to be sent comprises: adopt template engine to call the mail template corresponding with mail to be sent from the mail template set in advance.By calling the mail template corresponding with mail to be sent the mail template from setting in advance, can meet rapidly different user and send personalized mail demand, for example, the template of calling can be following form:
$ username}, you are good, Custom House Welcome to Custom House<A href=$ url}target=_blank > ZTE Corporation</A >!
Sender's e-mail messages mail.properties
Main contents are as follows:
mail.host=smtp.gmail.com
mail.port=25
mail.username=yourname
mail.password=yourpassword
mail.smtp.auth=true
mail.smtp.timeout=25000
mail.default.from=yourname@gmail.com
Realize the transmission of mail, in this preferred embodiment, use the mail template to generate mail to be sent and send and comprise: by configuration file, for the information that sends mail to be sent, being filled up to the mail template, generating mail to be sent and send.Be about in configuration file for the information that sends mail to be sent (for example, load property file (propertyConfigurer), load mailbox server parameter information (mailSender), load the information such as mail sender's parameter information (simpleMailMessage)) be filled up to generation mail to be sent in the mail template, exactly mail to be sent is sent.
For the ease of the transmission of different mail, in this preferred embodiment, use the mail template to generate mail to be sent and send and comprise: select the send mode be complementary with email type to be sent to send mail to be sent.Can adopt different send modes for different mails, for example, this send mode can comprise: send the mode of the mail of the mode of template mail, the mode that sends text-mail, transmission webpage format, the mode that transmission includes the webpage format mail of picture or annex.
Transmission success in order to ensure mail, improve the success ratio that sends mail, in this preferred embodiment, before loading configuration file, send mode detected, and determines that send mode is normal.For example, call the sendXXX () wanted after setting parameter, test and send the mail parameter.
In this preferred embodiment, a kind of preferred mail dispensing device is provided, as shown in Figure 2, this mail dispensing device comprises: load-on module 202, for loading configuration file, wherein, configuration file comprises: template engine; Calling module 204, be connected to load-on module 202, for adopting template engine, calls the mail template that mail to be sent is corresponding; Sending module 206, be connected to calling module 204, for using the mail template, generates mail to be sent and send.
In above preferred embodiment, by load-on module 202 loading configuration file, load template engine, calling module 204 is adjusted and the mail template corresponding with mail to be sent by template engine, then, sending module 206 is used above-mentioned mail template to generate mail to be sent, and mail to be sent is sent, realized can be different according to the user demand call different mail templates by template engine, to generate different mails, when meeting the multiple demand of user, use due to template engine, the problem that all needs exploitation code while having avoided the mail of each transmission different-style, thereby reduced code redundancy, reduced developer's workload, reduced maintenance cost.
Meet the demand of different user in order to obtain in real time various mail template, in this preferred embodiment, as shown in Figure 3, above-mentioned mail dispensing device also comprises: update module 208, and for the interval predetermined period mail template that more new database sets in advance.
Transmission success in order to ensure mail, improve the success ratio that sends mail, in this preferred embodiment, as shown in Figure 4, above-mentioned mail dispensing device also comprises: detection module 210, for the mode to sending mail to be sent, detected, and determine that send mode is normal.
Below in conjunction with accompanying drawing, above-mentioned each preferred embodiment is described in detail.
Fig. 5 is the transmission according to the embodiment of the present invention, the schematic diagram of reception mail, as shown in Figure 5, sends the environment schematic diagram of mail, and operator carries out the mail transmission by the intenet network, and domestic consumer receives mail by the intenet network and carries out the mail reading.Under internet commercial websites application scenarios, by the configuration of the difference to the template resource, reach and do not increasing under the prerequisite of revising the java code, for different client crowds, load different templates, realize sending personalized mail, for example, send the template mail, send the plain text mail, send the webpage format mail, send the webpage format mail that comprises picture, send the personalized mails such as webpage format mail that comprise annex.The implementation method of above-mentioned transmission mail, code structure is clear, and project development is complete, after deployment is reached the standard grade, follow-up without developer's intervention, the user only need to revise the template resource, just can send different e-mail messages according to service needed, reach and attract the user, improve the purpose of enterprise's self-image.Improve user's reading mail and experience, improved user's reading mail quality.Under the overall situation of Internet industry, expand the business of oneself for operator, improved feasible method.
Fig. 6 sends the schematic diagram of mail method according to the another kind of the embodiment of the present invention, as shown in Figure 6, operator loads into different mail templates according to business demand, then, mail is put into to transmit queue, by the internet network, sent, the mailbox of domestic consumer can be received the mail of operator by the internet network, domestic consumer opens the mailbox of oneself just can read the mail of the various personalizations of operator's transmission, improve user's reading mail and experience, improved user's reading mail quality.Above-mentioned transmission mail method comprises the steps:
Step 1: send mail service module (MailSenderService) (being equivalent to above-mentioned load-on module 202) loading configuration file.
Step 2: periodic refreshing mail formwork module (being equivalent to above-mentioned update module 208), carry out the scanning of mail template.
Step 3: send mail service module (MailSenderService) and load mail template (i.e. the mail template corresponding with mail to be sent).
Step 4: transmission mail service module (MailSenderService) is assembled (generating mail to be sent) by personalized mail and is put into mail queue.
Step 5: operator calls and sends mail service module (MailSenderService), by the internet network, personalized mail in mail queue is sent
Step 6: send mail, flow process finishes.
Step 7: personalized mail, by the internet network, enters domestic consumer's mailbox
Step 8: domestic consumer opens individual mailbox, the Personality of reading mail.
Step 9: receive mail, flow process finishes.
From above description, can find out, the present invention has realized following technique effect: pass through loading configuration file, load template engine, and adjust and the mail template corresponding with mail to be sent by this template engine, then, use above-mentioned mail template to generate mail to be sent, and mail to be sent is sent, realized can be different according to the user demand call different mail templates by template engine, to generate different mails, when meeting the multiple demand of user, use due to template engine, the problem that all needs exploitation code while having avoided the mail of each transmission different-style, thereby reduced code redundancy, reduced developer's workload, reduced maintenance cost.In addition, the interval predetermined period is to upgrading the template in template base, the mail template that quick obtaining needs; In addition, without restarting server, just can be loaded into different mail templates, be convenient to expansion, improve the dirigibility of system.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with general calculation element, they can concentrate on single calculation element, perhaps be distributed on the network that a plurality of calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in memory storage and be carried out by calculation element, and in some cases, can carry out step shown or that describe with the order be different from herein, perhaps they are made into respectively to each integrated circuit modules, perhaps a plurality of modules in them or step being made into to the single integrated circuit module realizes.Like this, the present invention is not restricted to any specific hardware and software combination.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (10)

CN2012102046937A2012-06-202012-06-20Mail sending method and devicePendingCN103426079A (en)

Priority Applications (2)

Application NumberPriority DateFiling DateTitle
CN2012102046937ACN103426079A (en)2012-06-202012-06-20Mail sending method and device
PCT/CN2013/075968WO2013189223A1 (en)2012-06-202013-05-21Mail sending method and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN2012102046937ACN103426079A (en)2012-06-202012-06-20Mail sending method and device

Publications (1)

Publication NumberPublication Date
CN103426079Atrue CN103426079A (en)2013-12-04

Family

ID=49650781

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN2012102046937APendingCN103426079A (en)2012-06-202012-06-20Mail sending method and device

Country Status (2)

CountryLink
CN (1)CN103426079A (en)
WO (1)WO2013189223A1 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104954238A (en)*2015-07-172015-09-30上海斐讯数据通信技术有限公司Email template management method and system
CN105608559A (en)*2015-12-282016-05-25歌尔声学股份有限公司Generation method and system of multi-language mail
CN105787696A (en)*2014-12-242016-07-20阿里巴巴集团控股有限公司Method for efficiently generating emails on computer and apparatus thereof
CN106533909A (en)*2016-11-182017-03-22灿芯半导体(上海)有限公司Email sending method and system
CN106934597A (en)*2017-03-022017-07-07努比亚技术有限公司Project development device and method based on demand pond management system
CN107146095A (en)*2016-03-012017-09-08阿里巴巴集团控股有限公司Exhibition information processing method, device and the mailing system of a kind of mail
CN107733789A (en)*2017-12-012018-02-23世纪龙信息网络有限责任公司E-mail sending method and device
CN110351182A (en)*2019-05-312019-10-18平安科技(深圳)有限公司E-mail sending method, device, equipment and computer readable storage medium
CN110474836A (en)*2019-08-162019-11-19深圳乐信软件技术有限公司A kind of email template generation method, calculates equipment and medium at device
CN111181842A (en)*2019-12-292020-05-19苏州浪潮智能科技有限公司 A method and system for sending emails based on different business logics
CN111641547A (en)*2020-04-272020-09-08完美世界控股集团有限公司Mail processing method, client, server and system
CN113556276A (en)*2020-04-232021-10-26北京沃东天骏信息技术有限公司Method and device for sending mail

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
GB2367977A (en)*2000-06-292002-04-17Hutchison Telephone Company LtPreparing and sending text and/or graphic messages from communication devices having limited input means
CN1881243A (en)*2005-06-162006-12-20吴超竑E-mail making system and method thereof
EP2249263A1 (en)*1997-07-222010-11-10Visto CorporationSystem and method for synchronizing electronic mail across a network
CN102065024A (en)*2010-12-142011-05-18东莞宇龙通信科技有限公司 A method, system and communication terminal for loading email stationery

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101616100B (en)*2008-06-242011-12-07联想(北京)有限公司Methods for pushing, receiving and transmitting mail, mail server and mail client
CN102170405B (en)*2010-02-252015-08-19腾讯科技(深圳)有限公司A kind of email processing method, mail server and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
EP2249263A1 (en)*1997-07-222010-11-10Visto CorporationSystem and method for synchronizing electronic mail across a network
GB2367977A (en)*2000-06-292002-04-17Hutchison Telephone Company LtPreparing and sending text and/or graphic messages from communication devices having limited input means
CN1881243A (en)*2005-06-162006-12-20吴超竑E-mail making system and method thereof
CN102065024A (en)*2010-12-142011-05-18东莞宇龙通信科技有限公司 A method, system and communication terminal for loading email stationery

Cited By (15)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105787696A (en)*2014-12-242016-07-20阿里巴巴集团控股有限公司Method for efficiently generating emails on computer and apparatus thereof
CN104954238A (en)*2015-07-172015-09-30上海斐讯数据通信技术有限公司Email template management method and system
CN105608559A (en)*2015-12-282016-05-25歌尔声学股份有限公司Generation method and system of multi-language mail
CN107146095B (en)*2016-03-012021-03-23创新先进技术有限公司Method and device for processing display information of mail and mail system
CN107146095A (en)*2016-03-012017-09-08阿里巴巴集团控股有限公司Exhibition information processing method, device and the mailing system of a kind of mail
CN106533909A (en)*2016-11-182017-03-22灿芯半导体(上海)有限公司Email sending method and system
CN106934597A (en)*2017-03-022017-07-07努比亚技术有限公司Project development device and method based on demand pond management system
CN107733789A (en)*2017-12-012018-02-23世纪龙信息网络有限责任公司E-mail sending method and device
CN107733789B (en)*2017-12-012020-09-08世纪龙信息网络有限责任公司Mail sending method and device
CN110351182A (en)*2019-05-312019-10-18平安科技(深圳)有限公司E-mail sending method, device, equipment and computer readable storage medium
CN110351182B (en)*2019-05-312022-06-17平安科技(深圳)有限公司Mail sending method, device, equipment and computer readable storage medium
CN110474836A (en)*2019-08-162019-11-19深圳乐信软件技术有限公司A kind of email template generation method, calculates equipment and medium at device
CN111181842A (en)*2019-12-292020-05-19苏州浪潮智能科技有限公司 A method and system for sending emails based on different business logics
CN113556276A (en)*2020-04-232021-10-26北京沃东天骏信息技术有限公司Method and device for sending mail
CN111641547A (en)*2020-04-272020-09-08完美世界控股集团有限公司Mail processing method, client, server and system

Also Published As

Publication numberPublication date
WO2013189223A1 (en)2013-12-27

Similar Documents

PublicationPublication DateTitle
CN103426079A (en)Mail sending method and device
CN110310034B (en)Service arrangement and business flow processing method and device applied to SaaS
CN102929638B (en)Method and system for expanding Web application (App) functions
CN102355500B (en)Service push method and device
CN102567299A (en)Using text messages to interact with spreadsheets
US9438544B2 (en)Processing method for mobile device to display email, server, and mobile device
CN103959281A (en)Method for associating third party content with online document signing
US10871987B1 (en)Distributed execution of tasks on client devices
CN113821721A (en)User portrait based multi-channel message method and device and computer equipment
CN102780983A (en)System and method for facilitating multi-level forwarding of messages
CN104715394A (en)Method for providing advertisement service based on call
CN104601433A (en)Method, client, server and system for displaying application information window
CN104915856A (en)Personalized application downloading method of custom manufacturer and personalized application downloading system
KR101545285B1 (en)Server for manufacturing push motification message
CN103716310A (en)Javascript (js)-based method and device for docking with enterprise system
CN102594859B (en)A kind of rendering method of business datum, terminal, server and system
KR102522738B1 (en)Power rich communication service message transmission system and method thereof
CN104572099A (en)Assembly and middleware based low-coupling frame data processing method and system
KR20200064524A (en)A device for creating and sharing digital electronic business cards based on social network services/sites
KR20180016735A (en) Business processing methods and devices
CN109218402A (en)Hold cloud integrative solution
CN105100001A (en)Dynamic online interaction platform control method, management background and interaction platform
US20190066161A1 (en)Predictive system for selecting groups of users in connection with a network service
Dörflinger et al.Requirements of a mobile procurement framework for rural South Africa
US12119997B1 (en)Scaling service capacity

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20131204


[8]ページ先頭

©2009-2025 Movatter.jp