Hi,
Not sure this has its place in a symfony group...
Anyways, if you're using Swift v3, the way I've made that work was :
$message = new Swift_Message('your subject');
$message->attach(new Swift_Message_part($mailBody, 'text/html'));
then you can send it...
On 13 août, 12:50, DEEPAK BHATIA <[email protected]> wrote:
> Hi,
>
> As per the below code, the mail is send as "text/html".
>
> $mailBody="<b>"."This is the message"."<b>"
>
> But the message is not bold.
>
> Thanks
>
> Deepak
> ===================================================
>
> try
> {
> // Create the mailer and message objects
> $mailer = new Swift(new Swift_Connection_NativeMail());
> $message = new Swift_Message('Mail\'s subject', $mailBody, 'text/html');
>
> // Send
> $mailer->send($message, $mailTo, $mailFrom);
> $mailer->disconnect();}
>
> catch (Exception $e)
> {
> $mailer->disconnect();
>
> // handle errors here
>
> }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---