Re: how can I send a e-mail with the sender's address is my company's e-mail ???

From: Date: Mon, 02 Apr 2001 13:05:05 +0000
Subject: Re: how can I send a e-mail with the sender's address is my company's e-mail ???
References: 1  Groups: php.lang 
Request: Send a blank email to php-lang+get-131@lists.php.net to get a copy of this message
the mail() function has a fourth optional argument, $header. Give it a string with any email headers you want included. One of these headers is "From:". Each header must be separated with a newline. so, using your example, you need to add the fourth argument: $result = mail("abc@foo.com" , "E-mail Test" , "this e-mail is sent by php","From: me@mycompany.com") for more information, RTFM. :-) hope that helps. "Bass¨Ð¦õªv" <98350193j@polyu.edu.hk> wrote in message news:9a2rs7$39f$1@toye.p.sourceforge.net... > Hi , > > My copmany have a website and is hosted on a web server of some web hosting > company . > I want to use PHP to send e-mail on that server . > I use > > $result = mail("abc@foo.com" , "E-mail Test" , "this e-mail is sent by php") > ; > > to do it . > > But when I receive the e-mail , the SENDER 's address is the server's domain > name ! > such as 'anonmyous@hostingserver.com' > > It's a large problem if I send a e-mail to my clients with this cos they > won't know > who send the e-mail !! > > how can I send a e-mail with the sender's address is my company's e-mail ??? > for exmaple ' mycompany@company.com '?? > > THX A LOT > > > > -- > PHP Language Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-lang-unsubscribe@lists.php.net > For additional commands, e-mail: php-lang-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.lang (#131) next »