src/Generator.php
public function getEmail($person_name = null, $domain = null)
	{
		$username = $this->getUsername($person_name);
		
		$domains = [];
		$domains[] = !empty($domain) ? $domain : $this->getDomain();
		$domains[] = 'gmail.com';
		$domains[] = 'yahoo.com';
		$domains[] = 'me.com';
		$domains[] = 'msn.com';
		$domains[] = 'hotmail.com';
		
		$domain = $this->fromArray($domains);
		
		return preg_replace('/[^0-9a-z_A-Z.]/', '', strtolower($username)) . '@' . $domain;
	}
public function getEmail($person_name = null, $domain = null)
	{
		$username = $this->getUsername($person_name);
		
		$domains = [];
		$domains[] = !empty($domain) ? $domain : $this->getDomain();
		$domains[] = 'gmail.com';
		$domains[] = 'yahoo.com';
		$domains[] = 'me.com';
		$domains[] = 'msn.com';
		$domains[] = 'hotmail.com';
		
		$domain = $this->fromArray($domains);
		
		return preg_replace('/[^0-9a-z_A-Z.]/', '', strtolower($username)) . '@' . $domain;
	}
public function getEmail ( $ person_name = null , $ domain = null ) { $ username = $ this -> getUsername ( $ person_name ) ; $ domains = [ ] ; $ domains [ ] = ! empty ( $ domain ) ? $ domain : $ this -> getDomain ( ) ; $ domains [ ] = 'gmail.com' ; $ domains [ ] = 'yahoo.com' ; $ domains [ ] = 'me.com' ; $ domains [ ] = 'msn.com' ; $ domains [ ] = 'hotmail.com' ; $ domain = $ this -> fromArray ( $ domains ) ; return preg_replace ( '/[^0-9a-z_A-Z.]/' , '' , strtolower ( $ username ) ) . '@' . $ domain ; }
Return an email address.
You can optionally pass a name to use in the address

@param null $person_name
@param null $domain
@return string
Return an email address . You can optionally pass a name to use in the address