Jump to content

Want to insert a link in this php generate email...need help


Recommended Posts

I have a registration html form that processes this php file which in turns sends the registrar an email.  I want to include in the BODY of the email a link and possibly a clickable picture but cant figure out the syntax for it.  Can anyone help.

 

 

// Prepare and send Email to member with Login ID and Password Info
$EmailFrom =  "MembersLogin@mdsnowremoval.com";
$EmailTo = Trim(stripslashes($_POST['Email']));
$Subject = "MDSnowRemoval Membership Verification";
// validation
$validationOK=true;
if (Trim($EmailTo)=="") $validationOK=false;
if (!$validationOK) {
  print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
  exit;
}
// prepare email body text
$Body = "";
$Body .= "WELCOME!  Your registration to MDSnowRemoval.Com has been completed and filed in our records.";
$Body .= "\n";
$Body .= "\n";
$Body .= "Please make note of your login ID and PASSWORD. The login information is case sensitive so be sure to enter it EXACTLY as it appears.";
$Body .= "\n";
$Body .= "\n";
$Body .= "LOGIN ID: ";
$Body .= $LastName;
$Body .= "\n";
$Body .= "PASSWORD: ";
$Body .= $Email;
$Body .= "\n";
$Body .= "\n";
$Body .= "Please Support our affiliated MESSAGE FORUM.  http://www.plowmasters.com";
$Body .= "\n";
$Body .= "You may return to the members page";
$Body .= "";
$Body .= "";    //////WANT TO INSERT "Please support our message forum PlowMasters.Com"//// with either a link or a clickable picture.
$Body .= "";
// send email 
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");

?>

just insert a regular link:

 

<A href='http://www.somedomain.com'>Please click here</A>

 

nothing magic...

 

Does not work.  it displays in the email the exact line  <A href="http://www.plowmasters.com'>Our Forum</A>

<?php
mail('recipient@some.net', 'Subject',
    '<html><body><p>Your <i>message</i> here.</p></body></html>',
    "To: The Receiver <recipient@some.net>\n" .
    "From: The Sender <sender@some.net>\n" .
    "MIME-Version: 1.0\n" .
    "Content-type: text/html; charset=iso-8859-1");
?>

from here:

http://www.sitepoint.com/article/advanced-email-php

http://www.sitepoint.com/article/code-html-email-newsletters

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.