perficut Posted September 16, 2007 Share Posted September 16, 2007 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>"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/69565-want-to-insert-a-link-in-this-php-generate-emailneed-help/ Share on other sites More sharing options...
BlueSkyIS Posted September 16, 2007 Share Posted September 16, 2007 just insert a regular link: <A href='http://www.somedomain.com'>Please click here</A> nothing magic... Quote Link to comment https://forums.phpfreaks.com/topic/69565-want-to-insert-a-link-in-this-php-generate-emailneed-help/#findComment-349553 Share on other sites More sharing options...
perficut Posted September 16, 2007 Author Share Posted September 16, 2007 I thought I tried that but I will give it another try. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/69565-want-to-insert-a-link-in-this-php-generate-emailneed-help/#findComment-349569 Share on other sites More sharing options...
rarebit Posted September 16, 2007 Share Posted September 16, 2007 It looks like a plain text email to me, e.g. use of '\n'. Quote Link to comment https://forums.phpfreaks.com/topic/69565-want-to-insert-a-link-in-this-php-generate-emailneed-help/#findComment-349572 Share on other sites More sharing options...
Wuhtzu Posted September 16, 2007 Share Posted September 16, 2007 You need to specify through a header that it is html and not plain text. Post the code containing your headers. Quote Link to comment https://forums.phpfreaks.com/topic/69565-want-to-insert-a-link-in-this-php-generate-emailneed-help/#findComment-349690 Share on other sites More sharing options...
perficut Posted September 16, 2007 Author Share Posted September 16, 2007 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> Quote Link to comment https://forums.phpfreaks.com/topic/69565-want-to-insert-a-link-in-this-php-generate-emailneed-help/#findComment-349712 Share on other sites More sharing options...
rarebit Posted September 16, 2007 Share Posted September 16, 2007 <?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 Quote Link to comment https://forums.phpfreaks.com/topic/69565-want-to-insert-a-link-in-this-php-generate-emailneed-help/#findComment-349718 Share on other sites More sharing options...
perficut Posted September 18, 2007 Author Share Posted September 18, 2007 Any other ideas? Quote Link to comment https://forums.phpfreaks.com/topic/69565-want-to-insert-a-link-in-this-php-generate-emailneed-help/#findComment-350631 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.