In brief, I am trying to write a message to the user once they have submitted the contact form using php. The problem is that I am trying to style the message a bit by adding stylistic element like bold, and spacing certain lines out with <br>
. It does seem to apply.
Below is the code.
$message = "Welcome". $full_name . "to Company!" . "<br>". "<br>". "<b>". " Company is
the mailbox for the 21st century that evolves per your need. " . "</b>". "<br>". "<br>". "
Letting you interact with you mail by viewing and deciding what to do with it as it is received at a
Company location throughout North America. ". "<b>". "Please use the below information to send a mail/package to your selected address:". "</b>". "<br>". $full_name. "<br>". $address. "<br>". "To login to your dashboard, please visit the following link"."<br>". "<a href=''http://company.com/userinterfaceSelect.php'>Your Dashboard</a>" ;
In it, there are <br>, <b>,
and a link, in which none seems to apply.
Update;
<?php
if(isset($_POST['submit'])){
$to = $_POST['email'];// this is your Email address
$from = "info@company.com"; // this is the sender's Email address
$full_name = $_POST['fullName'];
$address = $_POST['address'];
$subject = "Welcome to company";
$subject2 = "Copy: New Registration";
$message2 = "New User". "<br>" .$full_name . "\n\n" ;
$message = "Welcome". $full_name . "to company!" . "<br>". "<br>". "<b>". " company is
the mailbox for the 21st century that evolves per your need. " . "</b>". "<br>". "<br>". "
Letting you interact with you mail by viewing and deciding what to do with it as it is received at a
Company location throughout North America. ". "<b>". "Please use the below information to send a mail/package to your selected address:". "</b>". "<br>". $full_name. "<br>". $address. "<br>". "To login to your dashboard, please visit the following link"."<br>". "<a href=''http://company/userinterfaceSelect.php'>Your Dashboard</a>" ;
$headers = "From:" . $from;
$headers2 = "From:" . $to;
mail($to,$subject,$message,$headers);
mail($from,$subject2,$message2,$headers2); // sends a copy of the message to the sender
echo "Your mail has been sent successfuly ! Thank you for your feedback";
// You can also use header('Location: thank_you.php'); to redirect to another page.
}
?>