0

I have an email issue.when I am sending mail.its showing the HTML tag in mail body.like following.
Thanks for signing up for Imprimis. You will receive your Imprimis publication soon.If you did not signup, or do not wish to receive this information, please <a href="http://www.imprimissignup.com/unsubscribe.php?email=anumitadas@gmail.com">click here</a>.

My code is for connecting smtp as follows:

$body1 = 'Thanks for signing up for Imprimis. You will receive your Imprimis publication soon.If you did not signup, or do not wish to receive this information, please <a href="http://www.imprimissignup.com/unsubscribe.php?email='.$email.'">click here</a>.';

$from = "Imprimus <noreply@imprimissignup.com>";
$to = $email;
$subject = "Thanks for signing up for Imprimis";
//$body = "This is a test email message";

$host = "mail.emailsrvr.com";
$username = "noreply@imprimissignup.com";
$password = "noRepAcct6";

$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $username,
'password' => $password));

$mail = $smtp->send($to, $headers, $body1);

if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by pritaeas
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.