Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Servidor SMTP Webmail #2744

Closed
rudybatero95 opened this issue Aug 8, 2022 · 1 comment
Closed

Servidor SMTP Webmail #2744

rudybatero95 opened this issue Aug 8, 2022 · 1 comment

Comments

@rudybatero95
Copy link

rudybatero95 commented Aug 8, 2022

2022-08-08 22:25:15 SMTP ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: Host desconocido. (0) 2022-08-08 22:25:15 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

function enviarEmail($email, $nombre, $asunto, $cuerpo){

	require_once '../PHPMailer/PHPMailerAutoload.php';
	
	$mail = new PHPMailer();

	$mail->SMTPDebug = 2;
	$mail->isSMTP();
	$mail->Host = 'smtp.ayrmulti.com'; //Modificar
	$mail->SMTPAuth = true;
	$mail->Username = '[email protected]'; //Modificar
	$mail->Password = 'clave'; //Modificar
	$mail->SMTPSecure = 'tls'; //Modificar
	$mail->Port = 465; //Modificar
	
	
	$mail->setFrom('[email protected]','Juan Perez'); //Modificar
	$mail->addAddress($email, $nombre);
	
	$mail->IsHTML(true);
	$mail->Subject = $asunto;
	$mail->Body    = $cuerpo;
	
	if($mail->send())
	return true;
	else
	return false;
}

help me!

@Synchro
Copy link
Member

Synchro commented Aug 9, 2022

It means either the hostname for your mail server is wrong, or you have a DNS problem. Fix those and PHPMailer will be able to work.

@Synchro Synchro closed this as completed Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants