1

I want to send a mail with url. My url is

$request = "http://" . $_SERVER['HTTP_HOST'] . "/"; 

These url is included in mail body,but with these url mail do not send.

My code is

$message88 .="<html><body><a href=".$request.".'activate_sale.php?insert_id=$sale_id' style='text-decoration:none;'><font size='3'>Accept</font></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href=".$request.".'reject_sale.php?insert_id=$sale_id' style='text-decoration:none;'><font size='3'>Reject</font></a></body></html>"; 

Anybody help me?

7
  • How could you send emails? i.e via PHP mail function? Commented Apr 9, 2015 at 10:31
  • What do you mean by "the mail doesn't send"? The link shouldn't have any effect at all on whether PHP will send a mail, it doesn't care about the content of the mail. Commented Apr 9, 2015 at 10:32
  • first you check with normal text it is sending or not then after try with html!! Commented Apr 9, 2015 at 10:33
  • @sємsєм with php mail function Commented Apr 9, 2015 at 10:35
  • Well, by default PHP mail function only supports plain text mails. To make life more easier, try to use any library that able to send HTML mail contents. Commented Apr 9, 2015 at 10:37

1 Answer 1

1

Try this:

$request = "http://" . $_SERVER['HTTP_HOST'] . "/"; $message88 ="<html><body><a href='".$request."activate_sale.php?insert_id=$sale_id' style='text-decoration:none;'><font size='3'>Accept</font></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href='".$request."reject_sale.php?insert_id=$sale_id' style='text-decoration:none;'><font size='3'>Reject</font></a></body></html>"; 
Sign up to request clarification or add additional context in comments.

3 Comments

I checked the html which is getting correctly now. but earlier not. Mail not sending can be any mail issue. WHat is the error you are getting?
Error is mail is not get in my inbox,,my server is in goddady,any problem with that?
So as I told, this is not regarding the html or php issue. Check in your spam or junk folder.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.