Re: Re: Sending email
| From: | Octavian Rasnita | Date: | Sun, 22 Aug 2004 12:22:57 +0000 |
| Subject: | Re: Re: Sending email | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-194417@lists.php.net to get a copy of this message | ||
Thank you all, but how can I send the message from the one@server.com email
adress, but in the header of the message to put two@server.com?
Something like giving the following commands to an SMTP server:
telnet mail.server.com 25
helo mail.server.com
mail from:one@server.com
rcpt to: destination@another.com
data
From: Two<two@server.com>
To: ZZZ<zzz@server.net>
Subject: subject
test body
.
So the message is sent from the one@server.com email address and goes to
destination@another.com.
But when the message is received, it appears with the data from the body of
the message (after the "data" command), meaning from two@server.com to
zzz@server.net.
And another question is why it appears the following error message (under
Windows 2000):
PHP Warning: mail(): "sendmail_from" not set in php.ini or custom "From:"
header missing in...
I don't want to set that in php.ini, but I have put "From: email@server.com"
as the fourth parameter of the mail() function, however, it still gives me
that error.
I am running a local smtp server.
Thank you much.
Teddy
----- Original Message -----
From: "M. Sokolewicz" <tularis@php.net>
To: <php-general@lists.php.net>
Sent: Sunday, August 22, 2004 1:31 PM
Subject: [PHP] Re: Sending email
> Octavian Rasnita wrote:
>
> > Hi all,
> >
> > I want to send a test message with the following specifications:
> >
> > 1. The message is sent by sender@server.com.
> >
> > 2. The message is sent to the following recipients: dest1@another.com,
> > dest2@another.com.
> >
> > 3. The message has the subject: subject@third.com
> >
> > 4. The message has the following header:
> > From: Me<me@you.net
> > To: Multiple recipients<recipients.info>
> >
> > 5. The body of the message is:
> >
> > Test
> >
> > Can I use mail() function for this?
> >
> > Thank you.
> >
> > Teddy
> sure you can :)
>
> just do
> mail('dest1@another.com, dest2@another.com', 'subject@third.com',
> 'test', 'From: Me <me@you.net>');
>
> more info:
> (http://www.php.net/manual/en/function.mail.php)
>
> --