[thelist] PHP Mail Headers

Burhan Khalid burhankh at hotmail.com
Wed Sep 26 15:24:18 CDT 2001


Your problem isn't with your mail() call, it is with the PHP configuration 
at your ISP. There is a line in php.ini that specifies the
outgoing email address (and smtp server). I have a similar situation with my 
PHP feedback page at m.e.o. The from field always says nobody at leo.evolt.org. 
My workaround was to append the end of the message with the name of the 
sender and their email. You can try adding the extra headers, but it will 
not change the From : field in your email. I have yet to find out a 
workaround for this.

I'm sure you know this, but there is the link to the php.net reference for 
mail() (they have some good examples with headers)

<a 
href="http://www.php.net/manual/en/function.mail.php">http://www.php.net/manual/en/function.mail.php</a>

<tip author="Burhan Khalid">

Using email functions in PHP? Want a quick validation routine?
Use this function, which does a pretty comprehensive validation of
email address(s). Not fool proof, but it works :

function checkEmail($address)
{
if(ereg( "^[^@  
]+@([a-zA-Z0-9\-]+\.)+([a-zA-Z0-9\-]{2}|net|com|gov|mil|org|edu|int)\$",$address))
		return true;
	else
		return false;
}

Usage :

  if (checkEmail($funkyemail)) { <proceed> } else { <error> }


</tip>

Regards,
Burhan Khalid
-------------
E : burhankh at bigfoot.com
P : members.evolt.org/burhankhalid
W : www.swosucomputerclub.f2s.com



----Original Message Follows----
From: thelist-admin at lists.evolt.org
Reply-To: thelist at lists.evolt.org
To: thelist at lists.evolt.org
Subject: thelist digest, Vol 1 #1671 - 27 msgs
Date: Wed, 26 Sep 2001 12:26:32 -0500 (CDT)
MIME-Version: 1.0
Received: from [63.237.54.245] by hotmail.com (3.2) with ESMTP id 
MHotMailBD7B5BBF0088400438943FED36F50EE20; Wed, 26 Sep 2001 10:30:59 -0700
Received: from leo (lists.evolt.org [63.237.54.247])by relay.evolt.org 
(Postfix) with ESMTPid 1FA4CBBB; Wed, 26 Sep 2001 12:26:32 -0500 (CDT)


More information about the thelist mailing list