Jon Lighthill Jon Lighthill - 8 days ago 5
PHP Question

Hyperlinks not showing up in Yahoo - PHP Mail Function

I currently am running a site where students can buy and sell books to each other for my college. Its www.books4csusm.com. The past few days I have been getting e-mails where people are unable to delete their book.

After submitting their books they are sent an e-mail using PHP mail function and it displays their books along with a link to the right of the title to delete it.

It works for me on gmail(and it doesnt work for other people that use gmail, very weird) but I just tried it in yahoo and it looks like a link but you can't click it. At first I was using books4csusm@gmail.com to send the e-mail.

Then I did some research and found out that I should use an e-mail that corresponds to my domain so now I am using support@books4csusm.com

I am stuck and have no idea and I keep on getting e-mails from users asking if I can delete their book.

http://i.imgur.com/ErA1fqc.png

It is showing up as a link but when you click it nothing happens. When I inspect element this is what it shows.

<a id="yui_3_7_2_1_1377788967568_2506" rel="nofollow">
Delete Book
</a>


No idea what to do

function send_book_email($email, $post_id, $name)
{
$to = $email;
$subject = "$name , Your Book(s) have been Submitted!";
$message = "Hello $name,<br><br>Thank you for using www.books4csusm.com. <strong>Please do not delete this e-mail.</strong><br><br>";
$message .= "<strong>Title</strong><br>";

$book_id = get_book_id($post_id);
while($row = mysqli_fetch_array($book_id))
{
$message .= "" . $row['title'] . " - <a href='www.books4csusm.com/remove_new.php?PostID=" . $post_id . "&BookID=" . $row['bookID'] . "'>Delete Book</a><br>";
}
$message .= "<br><br>To delete your book Select the Delete book above of the corresponding book.<br>";
$message .= "<br><br>Don't forget to like us on Facebook <a href='https://www.facebook.com/Books4Csusm'>https://www.facebook.com/Books4Csusm</a><br><br>BOOKS4CSUSM";

$from = "support@books4csusm.com";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "From:" . $from;
mail($to, $subject, $message, $headers);
}

Answer

I figured it out though and it was so simple that I overlooked it. I added the

 http:// to the www.books4csusm.com/remove_new 

and now it works. It does not show up as spam in yahoo and I can now delete the books that i have poseted.

Comments