Cita: he visto esta funcion pero hasta el momento no he podido implementarla desconosco la razon
Cita: This function makes connections to remote SMTP servers. This means that outgoing TCP network connections to port 25 must be possible. If this is not the case, then the script will not work.
Some hosting providers block exactly these network connections because they are also used by spammers.
When you always get “None of the mailservers listed for $domain could be contacted”, no matter what address you fill in, this is usually a good indication that port 25 is blocked. In this case there is no workaround other than finding a new hosting provider.
Aparte de esta advertencia, ¿porqué dices que no has podido hacerla implementar? ¿Qué error muestra?