How to send a picture to the form using php mailer in full format(not just the file name)to the specified mail?

Learn to use php in General, and at this stage studying phpmailer. At the moment I managed to implement sending data from the form as text to specified mail. But when you add a input type file and it is a photo, sending a file to mail I get the file name. How to make what would be seen the photo in General?
<?php 

require_once('phpmailer/PHPMailerAutoload.php');
$mail = new PHPMailer;
$mail->CharSet = 'utf-8';

$profileImage1 = $_POST['profileImage1'];
$profileImage2 = $_POST['profileImage2'];
$profileImage3 = $_POST['profileImage3'];
$name = $_POST['name'];
$age = $_POST['age'];
$parameters = $_POST['parameters'];
$from = $_POST['from'];
$insta = $_POST['Insta'];
$user_mail = $_POST['mail'];

//$mail->SMTPDebug = 3; // Enable verbose debug output

$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp.test@mail.ru'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'test@mail.ru'; // Your username from the email which will be sent letters
$mail->Password = 'Password'; // Your password by email which will be sent letters
$mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 465; // TCP port to connect to / this port may differ from other providers

$mail->setFrom('test@mail.ru'); // from whom will take a letter?
$mail->addAddress('test2@mail.ru'); // Someone will leave a letter 
//$mail->addAddress('ellen@example.com'); // Name is optional
//$mail->addReplyTo('info@example.com', 'Information');
//$mail->addCC('cc@example.com');
//$mail->addBCC('bcc@example.com');
//$mail->list('/var/tmp/file.tar.gz'); // Add attachments
//$mail->list('/tmp/image.jpg', 'new.jpg'); // Optional name
$mail->isHTML(true); // Set email format to HTML

$mail->Subject = 'Join us';
$mail->Body = 'Name:' . $name . '<br>Parameters:' . $parameters . '<br>Age:' . $age . '<br>Country,city:' . $from . '<br>Photo:<br>' . $profileImage1 . $profileImage2 . $profileImage3 . '<br>Email: '. $user_mail . '<br>Instagram:' . $insta;
$mail->AltBody = ";

if(!$mail->send()) {
 echo 'Error';
} else {
 header('location: thank-you.html');
}
?>


The appearance of the page
https://jsfiddle.net/johathan_Cartwrigh/eb4fuwg2/2/
April 19th 20 at 12:15
0 answer

Find more questions by tags PHPMailerPHP