Manikanta
Manikanta

Reputation: 1

message body is blank while sending mail through php for hotmail

The mail is coming nice for all accounts except for the hotmail. in hotmail the message body is getting blank.but while checking with view sources the message body is displaying.please help us is there any setting need to change for hotmail

function Trigger_WelcomeEmail(&$tNG) {

global $DID;

$emailObj = new tNG_Email($tNG);
$emailObj->setFrom("test <[email protected]>");
$emailObj->setTo("{email}");
$emailObj->setCC("");
$emailObj->setBCC("[email protected]");
$emailObj->setSubject("Smile! You Were Successfully Registered for test.com");




$emailObj->setContentFile("welcomeUS.html");


$emailObj->setEncoding("ISO-8859-1");
$emailObj->setFormat("HTML/Text");
$emailObj->setImportance("Normal");
return $emailObj->Execute();
}   

Upvotes: 0

Views: 279

Answers (2)

Brent
Brent

Reputation: 304

Check to make sure you aren't sending two newline characters in a row in the welcomeUS.html file. This will close the body of the email and the remainder of the text might be ignored.

Some email service providers might ignore that issue automatically when they see more content being delivered after the newlines, but hotmail may not.

Upvotes: 0

Glen
Glen

Reputation: 695

Usually a header is set to Content-type:text/html

Perhaps it is reading your one wrong because your code; $emailObj->setFormat("HTML/Text"); has that backwards. Probably just a shot in the dark, but worth a shot!

Upvotes: 1

Related Questions