1

I am sending emails to gmail account. The message has a link. I'd like the link does not show up. Below is the part of the message. Gmail will show this part as it is, but I'd like gmail shows as Please ***click here*** to upload your application form.

Please <a href='http://www.mywebsite.com'>click here </a> to upload your application form.

Thanks.

user3783243
  • 5,368
  • 5
  • 22
  • 41
Will
  • 33
  • 1
  • 4

2 Answers2

1

Before sending your mail make sure you have selected the the mail format as HTML. You can find this according to your respective platform.

Rajat Jain
  • 1,339
  • 2
  • 16
  • 29
-1

The issue here might be because of missing headers for content type. Look at the following example:

$to = 'test@test.com';

$subject = 'PHP Mail Sending';

$headers = "From: scripts@email.com \r\n";
$headers .= "Reply-To: no-reply@email.com \r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=UTF-8\r\n";

$message = '<p>Hello, this is to check PHP mail function</p>';

mail($to, $subject, $message, $headers);

In above code, the line $headers .= "Content-Type: text/html; charset=UTF-8\r\n"; tells the mailer and the recipient that the email contains are well formed HTML

Suyog
  • 2,472
  • 1
  • 14
  • 27