An MFP can transmit image data read by a scanner by attaching it to
E-mail. At the time of transmission, the image data input by the scanner
and stored in a work memory is converted into mail data so as to be
transmitted by E-mail, and the mail data is stored again into the work
memory. The mail data is divided every predetermined reference data size
into divided files which are sequentially transmitted as divided mails.
When completion of transmission of divided mails corresponding to a unit
image is confirmed, the image data and mail data of the unit image are
eliminated from the work memory. By sequentially performing such a
process, the memory use efficiency can be improved while holding image
data of a unit image which has not been transmitted yet.