Mailbox URL Phpmailer
I write the content in the background, and then sent to the mailbox, the content contains a click link to the site of the link, but sent to the mailbox href= "XXX" will not have, as I wrote: $url = "www.baidu.com";
$emailContent = "Test";
But to the mailbox can not click on the link, turned into a test, ask you Daniel This is what is going on
Reply to discussion (solution)
Post Code for analysis
$url = "www.baidu.com";
$emailContent = "Test";
SendMail ($toEmail, ' Change Password confirmation email ', $emailContent);
function SendMail ($address, $title, $message)
{
Require ("thinkphp/extend/vendor/phpmailer_v5.1/class.phpmailer.php");
$mail =new Phpmailer ();
Set Phpmailer to send email using an SMTP server
$mail->issmtp ();
Set the character encoding of the message, or ' UTF-8 ' if not specified
$mail->charset= ' UTF-8 ';
Add a recipient address that can be used multiple times to add multiple recipients
$mail->addaddress ($address);
Set the message body
$mail->body= $message;
Sets the From field of the message header.
$mail->from=c (' mail_address ');
Set Sender Name
$mail->fromname=c (' Mail_sender ');
Set the message header
$mail->subject= $title;
Set up the SMTP server.
$mail->host=c (' mail_smtp ');
Set to "Require verification"
$mail->smtpauth=true;
Set the user name and password.
$mail->username=c (' mail_loginname ');
$mail->password=c (' Mail_password ');
$mail->ishtml (TRUE); Whether HTML mail is supported
Send the message.
Return ($mail->send ());
}
$url = "www.baidu.com";
$emailContent = "Test";
This paragraph was not resolved successfully.
$emailContent =<<
Test
TXT;
Do not understand, followed by your code to write, or not, in the mail received or test
It's possible that the email content is filtered.
Phpmail seems to have a parameter setting, whether to filter HTML
$url = "www.baidu.com";
$emailContent = "Test";
This paragraph was not resolved successfully.
$emailContent =<<
Test
TXT;
$emailContent =<<
Test
TXT;
Echo $emailContent;