ainoy31 Posted July 31, 2007 Share Posted July 31, 2007 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 More sharing options...
Asperon Posted July 31, 2007 Share Posted July 31, 2007 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 = '[email protected]'; $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 More sharing options...
ainoy31 Posted July 31, 2007 Author Share Posted July 31, 2007 Thanks for that. I need to fix why when I include the anchor tag <a href = " '.$url1.' ">here</a> as part of the body the page does not display. It is just a white blank screen. Link to comment https://forums.phpfreaks.com/topic/62736-mail-function/#findComment-312258 Share on other sites More sharing options...
Asperon Posted July 31, 2007 Share Posted July 31, 2007 a blank white screen means an error in your php... have fun Link to comment https://forums.phpfreaks.com/topic/62736-mail-function/#findComment-312309 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.