Easy email question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
mikusan
Forum Contributor
Posts: 247
Joined: Thu May 01, 2003 1:48 pm

Easy email question

Post by mikusan »

I would like to enter multiple emails in the From: tag of the mail() function

Is there any way? Can i cheat and pass a string there?

The one line of code that i need help with is like this:

Code: Select all

function send_email($to,$subject,$content)
{
$headers = "From: <admin1@hotmail.com;admin2@hotmail.com>\n";
User avatar
DuFF
Forum Contributor
Posts: 495
Joined: Tue Jun 24, 2003 7:49 pm
Location: USA

Post by DuFF »

You just need to seperate them by commas:

Code: Select all

<?php
$headers = "From: admin1@hotmail.com, admin2@hotmail.com\r\n";
?>
Post Reply