Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. mail from php

mail from php

Scheduled Pinned Locked Moved Web Development
questionphpcomtestingbeta-testing
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hiral_shah
    wrote on last edited by
    #1

    Hi there, How can I pass Hyperlink in mail by using php's mail function. i.e. $mailId = "abc@xyz.com"; $sub = "Testing of passing Hyperlink"; $body = "a target='_blank' href = 'test.com/Testing.php?action=checkLink'>Link Text" mail($mailId, $sub, $body);

    -------------------------------------------------------------------------------------------------- Hiral Shah India If you think that my question is good enough and can be helpful for other then don't forget to vote. :)

    B 1 Reply Last reply
    0
    • H hiral_shah

      Hi there, How can I pass Hyperlink in mail by using php's mail function. i.e. $mailId = "abc@xyz.com"; $sub = "Testing of passing Hyperlink"; $body = "a target='_blank' href = 'test.com/Testing.php?action=checkLink'>Link Text" mail($mailId, $sub, $body);

      -------------------------------------------------------------------------------------------------- Hiral Shah India If you think that my question is good enough and can be helpful for other then don't forget to vote. :)

      B Offline
      B Offline
      Bradml
      wrote on last edited by
      #2

      What you need to do is set the Emails Content-type: header to "text/html". Here is an example:

      $message = "<html><body><a href="example.html">Click Here</a></body></html>";

      $headers = "MIME-Version: 1.0 \r\n";
      $headres .= "Content-type: text/html; charset=iso-8859-1 \r\n";

      mail("bob@example.com", "Hello", $message, $headers);

      You can find more at: http://au3.php.net/manual/en/function.mail.php[^]

      Last modified: 15hrs 48mins after originally posted --


      Brad Australian - peterchen on "Who has the worst keyboard" Keyboard? Ha! I throw magnets over the RAM chips!

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups