is there any function in php that can support rich text email on windows server, i want to send mail from a windows server and text is not simple text but rich text.
thanx
mail problem
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
- itsmani1
- Forum Regular
- Posts: 791
- Joined: Mon Sep 29, 2003 2:26 am
- Location: Islamabad Pakistan
- Contact:
I tried send mail for windows server bit it did not worked.
i tried fowllowing code on windows server but it did not worked.
i tried fowllowing code on windows server but it did not worked.
Code: Select all
<?php
require('../../Swift.php');
require('../../Swift/Swift_Sendmail_Connection.php');
$connection = new Swift_Sendmail_Connection;
$mailer = new Swift($connection, $_SERVER['SERVER_NAME']);
//If anything goes wrong you can see what happened in the logs
if (!$mailer->hasFailed())
{
//Sends a simple email
$mailer->send(
'"Joe Bloggs" <abdul.mannan@machsol.com>',
'"Your name" <you@yourdomain.com>',
'Some Subject',
"Hello <b> This is me </b> Joe it's only me!"
);
//Closes cleanly... works without this but it's not as polite.
$mailer->close();
}
else echo "The mailer failed to connect. Errors: ".print_r($mailer->errors, 1).". Log: ".print_r($mailer->transactions, 1);
?>