IMAGE FORMING APPARATUS AND MAIL TRANSMISSION AND RECEPTION CONTROL METHOD FOR AN IMAGE FORMING APPARATUS

According to an embodiment, an image forming apparatus forms an image on paper on the basis of image data. A processor of the image forming apparatus performs authentication and authorization with an authorization server to acquire a token and then stores the token in a storage device. When transmitting and receiving an e-mail, the processor of the image forming apparatus transmits and receives an e-mail to and from a mail server by using the token read from the storage device.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 2022-046735, filed on Mar. 23, 2022, the entire contents of which are incorporated herein by reference.

FIELD

An Embodiment described herein generally relates to an image forming apparatus and a mail transmission and reception control method for the image forming apparatus.

BACKGROUND

There is known an image forming apparatus having a function of transmitting and receiving e-mails via an e-mail server that operates in a cloud service.

In recent years, in order to improve security, a technique in which authorization processing is performed using a token in connecting to a cloud service to eliminate an unauthorized connection has been used.

DETAILED DESCRIPTION

According to one embodiment, an image forming apparatus is capable of communicating externally. The image forming apparatus includes an image forming device, a storage device, a memory, and a processor. The image forming device forms an image on paper on the basis of image data. The storage device stores a token issued by an external authorization server. The memory stores an application program for acquiring the token and transmitting and receiving an e-mail. The processor executes the application program stored in the memory. The processor performs, by executing the application program, authentication and authorization with the authorization server to acquire the token issued by the authorization server. Further, the processor stores the acquired token in the storage device. Further, the processor acquires, when an e-mail is transmitted and received, the token stored in the storage device to transmit and receive the e-mail to and from a mail server by using the acquired token.

Hereinafter, an image forming apparatus, a control method therefor, and the like according to an embodiment will further be described with reference to the drawings. The same reference symbols in the drawings will denote the same or similar portions.

Functional Configuration

A functional configuration of an image forming apparatus according to an embodiment will be described with reference toFIG.1.FIG.1is a block diagram showing an example of an overall configuration of an image forming apparatus10and a functional configuration of a computer30of the image forming apparatus10according to the embodiment.

The image forming apparatus10is, for example, a multifunction machine or a multifunction peripheral (MFP), and has a plurality of functions such as a print function, a scan function, and a copy function.

Specifically, as shown inFIG.1, the image forming apparatus10incorporates the computer30. Further, the image forming apparatus10includes an operation panel11included in the computer30, an image reading device12, an image forming device13, a paper feeding and conveying device14, and a communication device41. Details of the computer30will be described later.

The operation panel11displays information for a user to operate the image forming apparatus10, and receives an instruction from the user. For example, the operation panel11includes a touch panel and displays operation buttons of icons on the touch panel. Alternatively, the operation panel11includes operation buttons of push buttons.

The image reading device12reads an image recorded on a document or the like using a sensor such as a contact image sensor (CIS) or a charge coupled device (CCD), and generates image data.

The image forming device13forms an image using toner on paper conveyed by the paper feeding and conveying device14on the basis of the image data generated by the image reading device12or the image data received from an external device (not shown) via the communication device41. Thus, the image forming device13includes a photoreceptor unit, a toner unit, and the like.

The paper feeding and conveying device14takes out paper from a paper feed cassette for storing paper, and conveys the paper to the image forming device13. Moreover, the paper feeding and conveying device14conveys the paper, on which the image is formed by the image forming device13, to a paper feed tray. The communication device41communicates with the outside.

For example, the communication device41communicates with an external authorization server21in order to acquire a token to be described later. Further, for example, the communication device41communicates with an external e-mail server22in order to transmit and receive an electronic mail (hereinafter, referred to as e-mail) to be described later. Further, for example, the communication device41communicates with an external device in order to acquire the above-mentioned image data from the external device.

As shown inFIG.1, the computer30of the image forming apparatus10includes a token acquisition unit15, a token storage unit16, an e-mail transmission and reception unit17, and a controller18as functional units. In other words, the computer30operates as the token acquisition unit15, the token storage unit16, the e-mail transmission and reception unit17, and the controller18.

The token acquisition unit15performs authentication and authorization with the authorization server21via the communication device41to acquire a token. The authentication performed by the token acquisition unit15with the authorization server21is XOAUTH authentication. The token acquisition unit15requests the authorization server21to issue a token with an authorization code.

The authorization server21refers to the authorization code and, if it can be confirmed that the token acquisition unit15has authority, issues a token. The token includes an access token and a refresh token. The access token is used when the e-mail transmission and reception unit17transmits and receives an e-mail to and from the e-mail server22. The access token includes information such as an expiration date and a connection authority. The expiration date is set to be short in order to improve security. The refresh token is used when the authorization server21is requested to reissue the access token.

The token storage unit16stores the token acquired by the token acquisition unit15, that is, the access token and the refresh token, in a storage device35to be described later. The token storage unit16also responds to the token request by outputting a token in response to the token request from the token acquisition unit15.

As described above, the image forming apparatus10incorporates the computer30. The token acquisition unit15is provided as an application including a program installed in the computer of the image forming apparatus10. The application of the token acquisition unit15is stored in the storage device35of the computer30. A processor (CPU32to be described later) of the computer30reads the application of the token acquisition unit15from the storage device35and executes a program of the application, thereby causing the token acquisition unit15to acquire a token and causing the token storage unit16to store the token.

The e-mail transmission and reception unit17transmits and receives an e-mail to and from the e-mail server22via the communication device41. Specifically, the e-mail transmission and reception unit17requests an access token from the token acquisition unit15. The e-mail transmission and reception unit17transmits and receives an e-mail to and from the e-mail server22via the communication device41by using the access token acquired as a response from the token acquisition unit15.

The e-mail transmission and reception unit17stores various settings related to the transmission and reception of an e-mail. The various settings include, for example, e-mail addresses, types of reception servers such as POP3 and IMAP, usernames, passwords, various settings of POP3 reception servers, various settings of IMAP reception servers, various settings of SMTP transmission servers, lists of e-mail addresses of individuals, and e-mail address books of grouped destinations.

The controller18controls the entire image forming apparatus10. Namely, the controller18controls the operation panel11, the image reading device12, the image forming device13, and the paper feeding and conveying device14. Moreover, the controller18controls the token acquisition unit15, the token storage unit16, and the e-mail transmission and reception unit17.

FIG.1shows the single token acquisition unit15and the single authorization server21for convenience of explanation. The token acquisition unit15is provided for each authorization server21. Namely, the image forming apparatus10may include a plurality of token acquisition units respectively corresponding to a plurality of authorization servers21. In other words, the applications of the plurality of token acquisition units15respectively corresponding to the plurality of authorization servers21may be installed in the computer of the image forming apparatus10.

Hardware Configuration

Next, a hardware configuration of the computer incorporated in the image forming apparatus10will be described with reference toFIG.2.FIG.2is a block diagram showing an exemplary hardware configuration of the computer30incorporated in the image forming apparatus10according to the embodiment.

As shown inFIG.2, the computer30incorporated in the image forming apparatus10includes an input device31, the CPU32, the storage device35, and an output device39. The computer30incorporated in the image forming apparatus10may further include other peripheral devices in addition to the above devices.

The input device31, the CPU32, the storage device35, and the output device39are electrically connected to each other via a bus40and exchange data and instructions via the bus40.

The input device31is a device that receives a signal from the outside, converts the signal into data, and passes the data to the CPU32and the storage device35.

The output device39is a device that receives data from the CPU32and the storage device35, converts the data into a signal, and outputs the signal.

The storage device35stores programs and data necessary for the CPU32to execute processing. The CPU32performs various types of processing by reading the necessary programs and data from the storage device35and executing the programs and data.

The storage device35includes a read-only memory (ROM)36, a main storage device37, and an auxiliary storage device38. The main storage device37and the auxiliary storage device38exchange programs and data with each other.

The ROM36stores a program (BIOS) for controlling the CPU32at the time of activation.

The main storage device37stores programs and data temporarily necessary for the CPU32to perform processing. For example, the main storage device37is a volatile memory such as a random access memory (RAM).

The auxiliary storage device38stores programs and data supplied via an external device or a network, and provides the main storage device37with programs and data temporarily necessary for the CPU32to perform processing. For example, the auxiliary storage device38is a non-volatile memory such as a hard disk drive (HDD) or a solid state drive (SSD).

The CPU32is a processor and is hardware that processes data or instructions. The CPU32includes a control device33and a computing device34.

The control device33controls the input device31, the computing device34, the storage device35, and the output device39.

The computing device34reads programs and data from the main storage device37, executes the programs to process the data, and provides the processed data to the main storage device37.

In such a hardware configuration, the input device31and the output device39are included in the operation panel11shown inFIG.1. Further, the storage device35constitutes the token storage unit16shown inFIG.1. Moreover, the CPU32and the storage device35constitute the token acquisition unit15, the e-mail transmission and reception unit17, and the controller18shown inFIG.1.

For example, the CPU32reads an application including a program for executing the function of the token acquisition unit15from the auxiliary storage device38to the main storage device37, and executes the read program, to thereby perform the operation of the token acquisition unit15.

The subject that performs an operation is, for example, a computer-related subject such as hardware, a complex of hardware and software, software, and running software. The subject that performs an operation is, but not limited to, for example, a process executed on a processor, a processor, an object, an executable file, a thread, a program, and a computer. For example, the token acquisition unit15or an application executed therein may be a subject that executes an operation. A process or thread may be caused to play a plurality of subjects that execute operations. The subject that performs an operation may be in a single token acquisition unit15or may be distributed to a plurality of token acquisition units15.

The functions described above may be recorded in the apparatus in advance, similar functions may be downloaded from a network to the apparatus, or similar functions stored in a recording medium may be installed in the apparatus. The recording medium may have any form such as a disc ROM and a memory card as long as the recording medium can store programs and can be readable by the apparatus. Further, the functions obtained in advance by installing or downloading may be implemented by cooperating with the operating system (OS) or the like inside the apparatus.

Operation Examples

Hereinafter, an operation example of the image forming apparatus10will be described with reference toFIG.3. Here, description will be given on an exemplary “Scan to Email” function of the e-mail transmission and reception unit17to transmit the image data of the document read by the image reading device12.FIG.3is a sequence diagram showing the operation of the computer30in the “Scan to Email” function. Here, it is assumed that the authentication with and the acquisition of the authorization code from the authorization server21are completed. The operation shown inFIG.3is performed under the control of the CPU32of the computer30.

First, pre-settings will be described. In Act1shown inFIG.3, when the user gives an instruction to start authorization from the operation panel11, the CPU32receives the instruction to start authorization via the operation panel11. In Act2, the token acquisition unit15of the CPU32requests the authorization server21to issue a token of Oauth2, together with the authorization code.

If the authorization server21has confirmed that the token acquisition unit15has authority by referring to the authorization code, the authorization server21issues a token, that is, an access token and a refresh token. In Act3, the token acquisition unit15of the CPU32acquires the issued access token and refresh token. The token acquisition unit15stores the acquired access token and refresh token in the storage device35(token storage unit16). Thus, the pre-settings are completed.

Next, the operation of the CPU32in the “Scan to Email” function will be described. If the user specifies the “Scan to Email” function from the operation panel11and inputs an e-mail address of a destination, in Act4shown inFIG.3, the CPU32receives the instruction of the function and the e-mail address via the operation panel11. In Act5, the CPU32controls the image reading device12to read a document and generate image data. The e-mail transmission and reception unit17of the CPU32starts an operation for transmitting the image data to the e-mail address of the destination.

In Act6, the e-mail transmission and reception unit17of the CPU32requests the access token from the token acquisition unit15. In Act7, when receiving a request of the access token, the token acquisition unit15of the CPU32reads the access token from the storage device35(token storage unit16). The token acquisition unit15then checks if the access token is valid on the basis of the expiration date included in the read access token.

If the access token is valid, in Act10, the token acquisition unit15of the CPU32responds to the e-mail transmission and reception unit17by outputting the access token, which is read from the storage device35(token storage unit16), to the e-mail transmission and reception unit17as it is.

If the access token is not valid, in Act8, the token acquisition unit15of the CPU32reads the refresh token from the storage device35(token storage unit16).

The token acquisition unit15transmits the read refresh token to the authorization server21, and requests the authorization server21to reissue the token, that is, the access token and the refresh token. If the authorization server21reissues the token, that is, the access token and the refresh token, in Act9, the token acquisition unit15of the CPU32acquires the reissued access token and refresh token.

In Act10, the token acquisition unit15of the CPU32stores the acquired, reissued access token and refresh token in the storage device35(token storage unit16). Further, the token acquisition unit15responds to the e-mail transmission and reception unit17by outputting the reissued access token to the e-mail transmission and reception unit17.

In Act11, when receiving the access token from the token acquisition unit15, the e-mail transmission and reception unit17of the CPU32transmits an e-mail, to which the image data is attached, to the e-mail server22(SMTP server) together with the access token.

In Act12, the CPU32controls the operation panel11to indicate that the e-mail transmission and reception unit17has completed the transmission of the e-mail.

In the above description of the operation, the example in which the e-mail transmission and reception unit17of the CPU32transmits the e-mail has been described, but if the e-mail transmission and reception unit17receives the e-mail, the operation is similarly performed except for the difference between transmission and reception.

As described above, in the image forming apparatus according to the embodiment, the token acquisition unit15, which is an application installed in the image forming apparatus10, takes charge of XOAUTH authentication. This makes it possible to support XOAUTH authentication while using various settings related to the transmission and reception of e-mails stored in the e-mail transmission and reception unit17as they are.