Sending files per e-mail with cronjobs

Hi, I made a cronjob for sending e-mails with attachements but there is a problem because I have an attachment icon without file in it, how can I solve this problem.