lse123 Posted June 8, 2011 Share Posted June 8, 2011 If textarea contents in an email form go to email-body, why link below do not open when clicked(Outlook 2003): <textarea name="message" id="message" class="text_normal" cols="60" rows="5"><p><a href='http://www.wwww.com/affiliates/banners.php'>http://www.wwwwwwww.com/affiliates/banners.php</a></p></textarea> what must be done? Link to comment Share on other sites More sharing options...
thescientist Posted June 8, 2011 Share Posted June 8, 2011 I'm not really sure what you're asking, but to get a link to open an email with a clients mail client, you need to use the mailto protocol.http://www.w3schools.com/HTML/tryit.asp?fi...=tryhtml_mailtoit will only work for users with a Mail client installed though. A better implementation would be to use a server side language and any mail sending capabilities it has. Link to comment Share on other sites More sharing options...
lse123 Posted June 9, 2011 Author Share Posted June 9, 2011 to open a link? in my case open a windows dialog to save or open file... how do, open browser and the particular url, clicked in the email? Link to comment Share on other sites More sharing options...
Err Posted June 9, 2011 Share Posted June 9, 2011 Are you wanting to use the mailto to send a link to the body of the email? If so, something like this would work:<a href="mailto:example@example.com?subject=A Subject&body=A Link">Mail To...</a>If you want something a little more dynamic:http://webstudio.wikispot.org/mailto_link_...e_and_body_text Link to comment Share on other sites More sharing options...
lse123 Posted June 9, 2011 Author Share Posted June 9, 2011 I use php mail() and the textarea text go to $body after press send email... well link do not work when email received, well? in text area i wrote <textarea name="message" id="message" class="text_normal" cols="60" rows="5"><p><a href='http://www.wwww.com/affiliates/banners.php'>http://www.wwwwwwww.com/affiliates/banners.php</a></p></textarea> Link to comment Share on other sites More sharing options...
jeffman Posted June 9, 2011 Share Posted June 9, 2011 Are you sending a complete HTML document, or only pieces of HTML. Look at example 4 here.It might be useful to test your output before you mail it. Just echo the email contents to your browser and view the source. See if it looks correct. It is possible that your HTML characters are getting escaped or turned into entities somehow. Link to comment Share on other sites More sharing options...
lse123 Posted June 9, 2011 Author Share Posted June 9, 2011 pieces of htmltextarea = $body[=$message] of email to mail() function... Link to comment Share on other sites More sharing options...
thescientist Posted June 9, 2011 Share Posted June 9, 2011 pieces of htmltextarea = $body[=$message] of email to mail() function...um, I think at this point it would just be easier to see the code you have written for your form and the PHP code you are using to get the form data and using mail() to send it with.edit: this should be in the PHP forums as it's been found out that you were using mail() this whole time. Link to comment Share on other sites More sharing options...
lse123 Posted June 9, 2011 Author Share Posted June 9, 2011 how insert links in a textarea field of html form? Link to comment Share on other sites More sharing options...
jeffman Posted June 9, 2011 Share Posted June 9, 2011 Dude, answering questions like this is like learning how to ride a bicycle on the telephone. If you want some serious help, post the code you're working with. Also, please try to answer ALL the questions that people ask you, not just the ones that you think are important. Link to comment Share on other sites More sharing options...
thescientist Posted June 9, 2011 Share Posted June 9, 2011 I'm still not sure what you're trying to do....at all. Can you just post your code? Link to comment Share on other sites More sharing options...
lse123 Posted June 10, 2011 Author Share Posted June 10, 2011 iN TEXTAREA INCLUDE along text and tags <a>, <p>,<br /> so this go to $message variable in PHP, and after get sent with mail(), well? Link to comment Share on other sites More sharing options...
thescientist Posted June 10, 2011 Share Posted June 10, 2011 it's real simple. you use forms and submit the form to a PHP script. in the PHP script you can get the value of the textarea. you can then use it with mail() to be sent as an email.Now. show us your code and let us help you. If you don't have any code, then write some and post it. If you aren't sure how to start, then read the tutorials. In case you have guessed it, we are only really willing to work with you if you have code and are showing us that you've at least made an attempt at solving the problem. Link to comment Share on other sites More sharing options...
lse123 Posted June 11, 2011 Author Share Posted June 11, 2011 web form herecode here if ($_POST['Submit2']) { sendNotificationToMe(); }function sendNotificationToMe() { // shift + tab $subject = $_POST['subject']; $to = "webmaster@wwwww.com"; $message = $_POST['message']; // HERE TEXT AREA TEXT $headers = "From:affiliates@wwwww.com"; $headers .= "\nReply-To:affiliates@wwwww.com"; $headers .= "\nContent-Type: text/html; charset=UTF-8"; $headers .= "\nMIME-Version: 1.0"; $message0 = "<p>Dear User ({$to}),</p>"; $m=$message0.$message; $sentmail = mail($to,$subject,$m,$headers) or die("Unable to execute mail(). Please try again later."); echo "Notification sent successfully To: webmaster@wwwww.com!";}?> Link to comment Share on other sites More sharing options...
lse123 Posted June 11, 2011 Author Share Posted June 11, 2011 DELETED SINCE IS A REPEAT Link to comment Share on other sites More sharing options...
Ingolme Posted June 11, 2011 Share Posted June 11, 2011 Headers have to be separated with "\n\r", not just "\n" Link to comment Share on other sites More sharing options...
lse123 Posted June 11, 2011 Author Share Posted June 11, 2011 Headers have to be separated with "\n\r", not just "\n""\n\r" or "\r\n"? anyway point is textarea can contain tags from the visitor[administrator]...? Link to comment Share on other sites More sharing options...
Ingolme Posted June 12, 2011 Share Posted June 12, 2011 Yes, the textarea can contain HTML. I think that your e-mails aren't being interpretted as HTML because the headers weren't separated properly. The php.net manual says that they're separated with "\r\n" Link to comment Share on other sites More sharing options...
lse123 Posted June 13, 2011 Author Share Posted June 13, 2011 Yes, the textarea can contain HTML. I think that your e-mails aren't being interpretted as HTML because the headers weren't separated properly. The php.net manual says that they're separated with "\r\n"inserted \r\n but same thing, well when link is from php [not from user-textarea] no problem link work... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.