PHP Send-Mail form to multiple email addresses

前端 未结 3 1041
醉话见心
醉话见心 2021-01-14 09:38

I\'m very new to PHP and am using a basic template \'send-mail\' form on a contact page. It\'s been requested that I send the email out to multiple email addresses when the

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-14 10:07

    Just add multiple recipients comma seperated in your $mail_to variable like so:

    $mail_to = 'nobody@example.com,anotheruser@example.com,yetanotheruser@example.com';
    

    See mail() function in PHP

提交回复
热议问题