0
I’m having a hard time sending one link with references, by email, with Phpmailer.
Can someone help me?
require 'phpmailer/PHPMailerAutoload.php';
$mail = new PHPMailer;
$mail->IsHTML(true);
$titulo = "Parabéns! Surgiu alguém interessado no(a) ".$partner_name;
$texto2 = "<html>";
$texto = "Parabéns! Surgiu um pretendente para o(a) ".$partner_name.". Para ver o pretendente, clique no link baixo. <br> ".$link;
$mail->setFrom('[email protected]', 'PetsMatch');
$mail->addReplyTo('[email protected]', 'First Last');
$mail->addAddress($ownerEmail, $ownerName.' '.$ownerLastName);
//Set the subject line
$mail->Subject = utf8_decode($titulo);
//$mail->CharSet = 'iso-8859-1';
$mail->Body = "
<p>Parabéns! Surgiu um pretendente para o(a) ".$partner_name.". Para ver o pretendente, clique no link baixo. <br> <a href='<a href='https://www.eeee.com.br/php/pares.php?type=".$type."&breed=".$breed."&sex=".$sex."&city=".$city."&state=".$state.">ver</a>;
</p>";
//$mail->msgHTML(utf8_decode($texto2));
//Replace the plain text body with one created manually
$mail->AltBody = 'This is a plain-text message body';
//Attach an image file
//$mail->addAttachment('images/phpmailer_mini.png');
//send the message, check for errors
if (!$mail->send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Aviso de interesse enviado!";
}
Post your code so it’s easier to help you. (Remove any confidential information first)
– KaduAmaral
And paste what comes to the email
– Felipe Douradinho
@Kaduamaral, I put my code.
– GustavoSevero