Solution for sending multi-destination e-mail and with html

1

Hello, I was worried about a solution for sending multi-destination mail and with html, I have an email sent by smtp gmail that works, but there are two problems that I can not solve.

Problem 1: I need to enable html codes in the body of the email, if I type text , the recipient must receive the bold text

Issue 2: I need to send to more than one recipient by using line wrapping when looping on the form

Following code is working but not complete: link

    
asked by anonymous 10.08.2014 / 20:49

1 answer

1

Very simple, maybe your difficulty is in programming the solution, not thinking about it;)

Problem 1:

$mail->addAddress('[email protected]', 'Joe User'); 

Problem 2:

$mail->Body = 'This is the HTML message body <b>in bold!</b>';

You just need to know how to manipulate the variables that will be passed to PHPmailer, for example:

Problem 1:

$destinatarios = array('[email protected]', 'Joe User');
$mail->addAddress($destinatarios); 

Problem 2:

$msg_html = "This is the HTML message body <b>in bold!</b>";
$mail->Body = $msg_html;
    
11.08.2014 / 23:27