I'm guessing that in
$smtp->send( array($mails), 'Testmessage', 'Test1' );
array($mails) is supposed to be an array of fifty emails.
header() doesn't do anything you want.
include('smtp.php');
$smtp = new SMTP( 'xxxxxxx', 'xxxxxxxx', 'xxxxxxxx' );
$num = 50
$data = file_get_contents('mailadressen.txt');
$mails = explode(';', $data);
$mail_batches = array_chunk($mails, $num);
foreach($mail_matches AS $batch)
{
$smtp->send( $batch, 'Testmessage', 'Test1' );
sleep(5);
}
You may want to use set_time_limit, otherwise you won't be able to send more than about three hundred mails.