Here's how to send an email through PHP for more than one recipient:
Php # Set recipients "fulano@dominio.com.br, beltrano@dominio.com.br, ciclano@dominio.com.br" ; $ Recipients = "fulano@dominio.com.br, beltrano@dominio.com.br, ciclano@dominio.com.br"; # Set the subject of the e-mail "Envio de e-mail para mais de um destinatário" ; $ Subject = "Sending email to multiple recipients; # Set the message of the e-mail "Testando o envio de e-mail pelo PHP para mais de um destinatário. \n Dica dada no htmlstaff.org" ; $ Message = "Testing sending email through PHP for more than one recipient. \ N Tip provided in htmlstaff.org"; We assign to # send the email to be normal or not mail ( $destinatarios , $assunto , $mensagem ) ) { if ( mail ($ recipients, $ subject, $ message)) { ; echo "Message sent." } else { ; echo "Something went wrong." } ?> |
Note: Remember that the mail () function was added in PHP 4 and that for the e-mail is sent it is necessary that your server has configured / running an SMTP server.
Popularity: 7% [ ? ]
Related posts Brought to you by Yet Another Related Posts Plugin .









