Multidestinatary and html email sending solution

Asked

Viewed 144 times

1

Hello, I need a Solution for sending multidestinatary email and with html, I have an email sending code by smtp gmail that works, but there are two problems that I can not solve.

Issue 1: Need to enable html code in the body of the email, if I write text, the addressee must receive the text in bold

Problem 2: I need you to send to more than one destination using line break when iserir in the form

Still code working, but not complete: http://pastebin.com/biwJKEmX

1 answer

1

Very simple, but perhaps your difficulty is in programming the solution, and 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 only 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;

Browser other questions tagged

You are not signed in. Login or sign up in order to post.