A scanning apparatus which can transmit an electronic mail, comprising: a scanner configured to scan a document and generate image data; a storage configured to store the image data generated by the scanner ; a performing unit configured to perform a login of a user to the scanning apparatus; a transmission destination setting unit configured to set an email address as transmission destination information of the electronic mail; a judgment unit configured to judge whether to attach the image data stored in the storage to the electronic mail or describe link information for receiving the image data in the electronic mail, based on at least the email address set by the transmission destination setting unit; and a transmission unit configured to transmit the electronic mail to which the image data has been attached or the electronic mail in which the link information for receiving the image data has been described, based on a result of the judgment by the judgment unit, characterized in that the scanning apparatus further comprises a transmission source setting unit configured to set an email address of the user which is in a login state to the scanning apparatus by the login process as transmission source information of the electronic mail, and the judgment unit is configured to judge to attach the image data to the electronic mail in a case where the email address set by the transmission destination setting unit is not same as the set email address of the user which is in the login state to the scanning apparatus, and judge to describe the link information for receiving the image data in the electronic mail in a case where the email address set by the transmission destination setting unit is same as the set email address of the user which is in the login state to the scanning apparatus. a scanner configured to scan a document and generate image data; a storage configured to store the image data generated by the scanner ; a performing unit configured to perform a login of a user to the scanning apparatus; a transmission destination setting unit configured to set an email address as transmission destination information of the electronic mail; a judgment unit configured to judge whether to attach the image data stored in the storage to the electronic mail or describe link information for receiving the image data in the electronic mail, based on at least the email address set by the transmission destination setting unit; and a transmission unit configured to transmit the electronic mail to which the image data has been attached or the electronic mail in which the link information for receiving the image data has been described, based on a result of the judgment by the judgment unit, characterized in that the scanning apparatus further comprises a transmission source setting unit configured to set an email address of the user which is in a login state to the scanning apparatus by the login process as transmission source information of the electronic mail, and the judgment unit is configured to judge to attach the image data to the electronic mail in a case where the email address set by the transmission destination setting unit is not same as the set email address of the user which is in the login state to the scanning apparatus, and judge to describe the link information for receiving the image data in the electronic mail in a case where the email address set by the transmission destination setting unit is same as the set email address of the user which is in the login state to the scanning apparatus. <EOS>