Isabella
Isabella

Reputation: 137

How to include html div or php into PHPMailer success message?

I want to includ HTML div or php page to display in the confirmation msg in PHPMailer, here is the code:

if (!$mail->send()) {
$msg .= "Mailer Error: " . $mail->ErrorInfo;
} else {
$msg .= "Message sent! Please read the information bellow.";   
// here I want to display php include or html div   
}

Upvotes: 0

Views: 203

Answers (1)

user7182340
user7182340

Reputation:

    if (!$mail->send()) {
$msg .= "Mailer Error: " . $mail->ErrorInfo;
} else {
$msg .= "<span id='id_name'>Message sent! Please read the information bellow.</span>";   
// here I want to display php include or html div   
}

Now you can css your #id_name as you want

Upvotes: 1

Related Questions