Jump to content

Recommended Posts

I am trying to include an anchor tag inside the body of an email.  Here is the code:

 

$body = "Match found for a flight.  Please review the flight information.\n\n" .

"Passenger Name: " . $fullname . "\n" .

"Number of Passengers: " . $numOfpass ."\n" .

"Flight Date: " . $date ."\n" .

"Dept Airport: " . $deptport ."\n" .

"Dest Airport: " . $destport ."\n" .

"Flight Number: " . $f_id ."\n\n" .

"Please log in to confirm the flight requested. \n" .

"Click <a href="'.$url1.'">here</a> to log in.";

 

This is not working.  Thank you much.

Link to comment
https://forums.phpfreaks.com/topic/62736-mail-function/
Share on other sites

this is something I used as basic mail() test

 

<?php
//this forms sends comments to the webmaster and sends a message to the senders email stating the message was recieved
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['category'];
$content = $_POST['content'];
$to = 'myurl@domain.com';
$from = 'From: me';
$mail = 'Name: '.$name."\n".'Email: '.$email."\n"."Comments: \n".$content."\n";
$message = ' ***THIS IS AN AUTOMATED MESSAGE DO NOT REPLY***'."\n \n"
	   .' iluvsocal will reply to your questions and comments as soon as they can.'
	   .' The process should only take a maximum of 24 hours but it will take longer if we are busy.'."\n \n"
	   .' Feel free to explore iluvsocal.com further.......etc etc.';

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Contact</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<?php
if(!$name || !$email || !$subject || !$content)
{
echo 'Form incomplete. Please go back and complete all fields.';
exit;
}

mail($to,$subject,$mail,$from); //sends comments to you
echo 'Your questions and comments were sent. We will do our best to respond within 24 hours.';
mail($email,'Domain - Your Request',$message,$from); //sends message to sender
exit;

?>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/62736-mail-function/#findComment-312248
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.