setFrom($recipientEmail, $recipientName); //Set an alternative reply-to address $mail->addReplyTo($senderEmail,$senderName); //Set who the message is to be sent to $mail->addAddress($senderEmail, $senderName ); //Set the subject line $mail->Subject = $senderSubject; $mail->Body = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test $mail->MsgHTML($body); $mail->AddAddress($recipientEmail, $recipientName); //$mail->AddAttachment("images/phpmailer.gif"); // attachment //$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment //now make those variables the body of the emails $message = '
'; $message .= 'Name: | " . $senderName . " |
Email: | " . $senderEmail . " |
Phone: | " . $senderPhone . " |
Email: | " . $senderMessage . " |