Sending Email From IP-Symcon PHP HTML Format in Outlook

Hi,

well i am trying to send email from PHP Code integrtae with HTML. SMTP_SendMail is also funtionin right with no Problems. Problem is when i wan to send emsail in Outlook i am not getting the right Format of Output of my email in Outlook. it Shows HTML Code with HTML Tags. I want to know can we use headers in IP_symcon PP Code here OR is there any possibilty that i can get right HTML Output Format in MS Outlook. When i run my Code it Shows right out in IP_Symcon Sktripausgabe

 but not in MSOUtLook.

Any Help will be apprecitable.

my test Code from PHP IP-Symcon ias follows:- 

$message = '<html>'."
";
	$message .=	'<head></head>'."
";	
	$message .=	'<body>'."
";
	$message .=	'<h1 style="color:#f40;">PHP</h1>'."
";
	$message .=	'<p style="color:#080;font-size:18px;">IP_Symcon Management Console[IP_Symcon]</p>'."
";
	$message .=	'</body>'."
";
	$message .= '</html>'."
";

SMTP_SendMail( /*[E-Mail, Send (SMTP)]*/,"", $message);

This way you are sending Plain-Text Emails, for HTML you can use for example PHPMailer or any description found by google for PHP for example here. Another way would be to add a feature request to IP-Symcon for HTML E-mail support by IP-Symcon methods.

thanks for your Kind Reply . i have treid the about Code with headers as follows: -

Can we use PHPMailer in IP-Symcon. Any example will be apprecitable.

$message = ‚<html>‘."
„;
$message .= ‚<head></head>‘.“
„;
$message .= ‚<body>‘.“
„;
$message .= ‚<h1 style=„color:#f40;“>PHP</h1>‘.“
„;
$message .= ‚<p style=„color:#080;font-size:18px;“>IP_Symcon Management Console[IP_Symcon]</p>‘.“
„;
$message .= ‚</body>‘.“
„;
$message .= ‚</html>‘.“
";

$headers = ‚MIME-Version: 1.0‘."
";
$headers .= ‚Content-type: text/html; charset=iso-8859-1‘ . "
";
$headers .= $message;

SMTP_SendMail(50264 /[E-Mail, Send (SMTP)]/, $subject, $headers );

echo $message;

Another way would be to add a feature request to IP-Symcon for HTML E-mail support by IP-Symcon methods..
Which Features we have in IP-Symcon??

I think the method SMTP_SendMail supports only plain text at the moment. So you could write in Funktionswünsche to add a special method for HTML email, so that you don’t have to use another class or script code to send html email by PHP.

You can try also


mail($to, $subject, $message, $headers);

instead of using


SMTP_SendMail(12345, "Alarm!", "Die Heizung ist ausgefallen!");

for mail($to, $subject, $message, $headers); i have to use PHPMail() class oder??:confused:

yes. i have also treid this but in Outlook i am gettinng Email with Text False. One Thing which quite sure that we cannot use headers here in this Format. How can i use PHPMailer() class here IP-Symcon?

$message = ‚<html>‘."
„;
$message .= ‚<head></head>‘.“
„;
$message .= ‚<body>‘.“
„;
$message .= ‚<h1 style=„color:#f40;“>PHP</h1>‘.“
„;
$message .= ‚<p style=„color:#080;font-size:18px;“>IP_Symcon Management Console[IP_Symcon]</p>‘.“
„;
$message .= ‚</body>‘.“
„;
$message .= ‚</html>‘.“
";

$to = 'O.Fqrooq@inmed.de';
$subject = 'Test Email';
$from = 'O.Fqrooq@inmed.de';
			
$headers =  'MIME-Version: 1.0'."

";
$headers .= ‚Content-type: text/html; charset=iso-8859-1‘ . "
";
$headers .= ‚X-Mailer: PHP/‘.phpversion().PHP_EOL;
$headers .= $message;

mail($to, $subject, $headers);

$newMail = mail($to, $subject, $headers);   

SMTP_SendMail(50264 /*[E-Mail, Send (SMTP)]*/, $subject, $newMail);
			
echo $newMail;

hi can you kindly tell where can i get Directory to save PHPmailer?

Do have any other idea to send formated html emails in Outlook?