Solution for sending multi-destination email and html
-
Hello, I charge a Solution for sending multi-destination email and with html, I have a mailing code for smtp gmail that works, but it has two problems that I can't solve.
Problem 1: I need to enable html code in the email body if I write text, the destination must receive the text in bold
Problem 2: I need you to send to more than one destination using line break when ising in the formulary
Follow code working but not complete: http://pastebin.com/biwJKEmX
-
Very simple, perhaps your difficulty is to program the solution, and not to think about it
Problem 1:
$mail->addAddress('joe@example.net', '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('joe@example.net', 'Joe User'); $mail->addAddress($destinatarios);
Problem 2:
$msg_html = "This is the HTML message body <b>in bold!</b>"; $mail->Body = $msg_html;