in reply to Sending an email of compiled data

You are sending the email inside the foreach loop so naturally each email sent will only contain one record. Build up your message text inside the foreach loop, appending each time and then do your mail sending once the foreach loop has ended.

Replies are listed 'Best First'.
Re^2: Sending an email of compiled data
by Superbroom2.0 (Novice) on Feb 06, 2017 at 22:34 UTC

    I was able to get this to work by concatenating each variable into another variable, then using that second variable as the "message body" of the email. Thank you for your help!

    $mail_body .= "\t$keyname $keyexpr $keycount $keyavailable\n"; ... $smtp->datasend("\t $mail_body \n");