<?php
$text = "Контактные email: test@gmail.com и test1@gmail.com";
$reg = '/([a-zA-Z0-9+.-]+)@([a-z.-]+)/';
$matches = array();
$count = preg_match_all($reg, $text, $matches);
for ($i = 0; $i <= $count; $i++) {
	echo $matches[0][$i]."\n";
}