Re: two small issues with php mail

From: Date: Mon, 19 Nov 2007 23:26:53 +0000
Subject: Re: two small issues with php mail
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-264819@lists.php.net to get a copy of this message
#1 email is only being sent to a few recipients. I need to implement $smtp = ‘localhost’; Somewhere, but I keep getting parse errors?
Don't use fancy ms-word quotes, use the normal single quotes. php mail() only uses the smtp config if you are sending on a windows machine. http://php.net/mail SMTP - Used under Windows only: host name or IP address of the SMTP server PHP should use for mail sent with the mail() function. If you want to do smtp authentication yourself, I suggest you get phpmailer and look at how it handles it (read the code and try to understand the process).
$headers = 'From: '.$fromname.' <'.$fromaddress.'>'.$eol; // $headers = 'bcc: 'kathyandrews@bellsouth.net';
This should be: $headers .= 'bcc: email@address.com'; otherwise this line is overwriting the 'from' line (notice the . before the = sign). In future don't post real email addresses because spam-bots get the archives from websites and use them, so kathyandrews is going to get a ton of spam because you've sent her email address around. -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#264819) next »