1,105,578 Community Members

To create url link inside an email body

Member Avatar
rime
Newbie Poster
24 posts since Aug 2007
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
1
 

How can I create links inside an email content? can you send me a code for that?

Member Avatar
somedude3488
Nearly a Posting Virtuoso
1,354 posts since Jun 2007
Reputation Points: 228 [?]
Q&As Helped to Solve: 202 [?]
Skill Endorsements: 7 [?]
 
0
 

do you mean as in sending an email with php with a link in the email?

Member Avatar
rime
Newbie Poster
24 posts since Aug 2007
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

do you mean as in sending an email with php with a link in the email?

exactly, such as the person who got the email would want to give a feedback and he would click the link feedback and a new PHP page would open..

Member Avatar
somedude3488
Nearly a Posting Virtuoso
1,354 posts since Jun 2007
Reputation Points: 228 [?]
Q&As Helped to Solve: 202 [?]
Skill Endorsements: 7 [?]
 
0
 

are you sending an html email or a text email?

Member Avatar
rime
Newbie Poster
24 posts since Aug 2007
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

are you sending an html email or a text email?

I am trying to write the code of sending an email with PHP, and inside the body of the mail I want to create a link..Please if you can help me..

Member Avatar
somedude3488
Nearly a Posting Virtuoso
1,354 posts since Jun 2007
Reputation Points: 228 [?]
Q&As Helped to Solve: 202 [?]
Skill Endorsements: 7 [?]
 
0
 

Try this:

This code is for an HTML Email

<?php
$our_email = "youremail@something.com";
$to = "someone@something.com";
$from = $our_email;
$subject = "yoursubject";
$message = <<<EOF
<html>
<body>
<a href="http://www.yourlink.com">Click Here!!!</a>
</body>
</html>
EOF;
$headers  = "From: $from\r\n";
$headers .= "Content-type: text/html\r\n";
$mail = mail($to, $subject, $message, $headers);
}
if ($mail) {
echo "Message sent successfully";
}
else {
echo "Message didn't send";
}
?>

This code is for a txt email

<?php
$our_email = "youremail@something.com";
$to = "someone@something.com";
$from = $our_email;
$subject = "yoursubject";
$message = "www.somelink.com";
$mail = mail($to, $subject, $message, "From: $our_email");
if ($mail) {
echo "Mail Sent";
}
else {
echo "Error - Mail Not Sent";
}
?>
Member Avatar
rstill1
Newbie Poster
1 post since May 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Can I use html to create a hyperlinked url in the body of an email?

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article