Re: [PHP] mail function and headers
Hi Chris, interesting thing, but i get the following error message : *Warning*: mail() [function.mailhttp://test4.rogtek.com/common/function.mail]: SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE. in */test4/common/sendmail.php* on line *119* how can i solve this by only PHP ? i do not have access to web hosting server or php.ini. thx, Alain. On Thu, Mar 13, 2008 at 12:57 AM, Chris [EMAIL PROTECTED] wrote: as you can see my Return-Path is still pointing on the wrong direction :-( any other idea ? return-path is set with the 5th mail() param: mail($to, $subject, $body, $headers, '[EMAIL PROTECTED]'); -- Postgresql php tutorials http://www.designmagick.com/ -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] mail function and headers
Alain Roger wrote: Hi Chris, interesting thing, but i get the following error message : *Warning*: mail() [function.mail http://test4.rogtek.com/common/function.mail]: SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE. in */test4/common/sendmail.php* on line *119* how can i solve this by only PHP ? i do not have access to web hosting server or php.ini. 1 of 2 options. 1) Find another host with safe-mode disabled 2) Use something like phpmailer to send your emails through an smtp server -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail function and headers
hiChris, i've read several forums where this mail() function from PHP initial package is not so great. Therefore a lot of people use PHPMailer which is more convenient for that purpose...especially more flexible. thanks a lot for your help. Alain On Thu, Mar 13, 2008 at 8:35 AM, Chris [EMAIL PROTECTED] wrote: Alain Roger wrote: Hi Chris, interesting thing, but i get the following error message : *Warning*: mail() [function.mail http://test4.rogtek.com/common/function.mail]: SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE. in */test4/common/sendmail.php* on line *119* how can i solve this by only PHP ? i do not have access to web hosting server or php.ini. 1 of 2 options. 1) Find another host with safe-mode disabled 2) Use something like phpmailer to send your emails through an smtp server -- Postgresql php tutorials http://www.designmagick.com/ -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] mail function and headers
Alain Roger wrote: hiChris, i've read several forums where this mail() function from PHP initial package is not so great. mail() works fine. phpmailer (and zendmailer, swiftmailer and other such packages) help you with things like: - sending through an smtp server - putting a multipart email together - adding attachments - embedding images in your email content and a whole bunch of other stuff so you don't have to write the code to do all of that. There's nothing fancy in any of them, and if you don't tell them to send through an smtp server, they use the normal mail() command (in most cases I think anyway). -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail function and headers
On Wed, Mar 12, 2008 at 10:28 AM, Alain Roger [EMAIL PROTECTED] wrote: Hi, i'm playing a little bit with the mail function from PHP 5.2.4 and email headers. here is a snippet of my code: $headers = 'From: '.$email. .$fromname. \r\n.'Reply-To:'.$email.\r\n.'X-Mailer: PHP/' . phpversion(); You have the From: header parameters reversed. Try this: ? $headers = From: .$fromname. .$email.\r\n; $headers .= Reply-To: .$email.\r\n; $headers .= X-Mailer: PHP/.phpversion().\r\n; /* */ ? -- /Dan Daniel P. Brown Senior Unix Geek ? while(1) { $me = $mind--; sleep(86400); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail function and headers
2008/3/12, Daniel Brown [EMAIL PROTECTED]: You have the From: header parameters reversed. Try this: ? $headers = From: .$fromname. .$email.\r\n; $headers .= Reply-To: .$email.\r\n; $headers .= X-Mailer: PHP/.phpversion().\r\n; /* */ ? you can add these headers: $header = From: $fromname$email\n; $header .= Reply-To: $email\n; $header .= Return-Path: $email\n; $header .= X-Mailer: PHP/ . phpversion() . \n; $header .= MIME-Version: 1.0\n; $header .= Content-type: text/plain; charset=iso-8859-1\n; $header .= Content-Transfer-encoding: 7bit\n; Try it. -- Scripts: http://www.spacemarc.it -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail function and headers
ok i will try... what about UTF-8 to ensure unicode ? my website and especially the form which will send this email, will be filled in by several nationalities... spanish, english, french, slovak, german,,... so isn't it easier to set up utf-8 ? A. On Wed, Mar 12, 2008 at 4:11 PM, spacemarc [EMAIL PROTECTED] wrote: 2008/3/12, Daniel Brown [EMAIL PROTECTED]: You have the From: header parameters reversed. Try this: ? $headers = From: .$fromname. .$email.\r\n; $headers .= Reply-To: .$email.\r\n; $headers .= X-Mailer: PHP/.phpversion().\r\n; /* */ ? you can add these headers: $header = From: $fromname$email\n; $header .= Reply-To: $email\n; $header .= Return-Path: $email\n; $header .= X-Mailer: PHP/ . phpversion() . \n; $header .= MIME-Version: 1.0\n; $header .= Content-type: text/plain; charset=iso-8859-1\n; $header .= Content-Transfer-encoding: 7bit\n; Try it. -- Scripts: http://www.spacemarc.it -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] mail function and headers
ok, so this is what i got and it is still remaining... :-( Received: from serdev ([127.0.0.1]) by home.com with MailEnable ESMTP; Wed, 12 Mar 2008 16:40:18 +0100 Date: Wed, 12 Mar 2008 16:40:18 +0100 Subject: subject 3 To: [EMAIL PROTECTED] From: raf, news [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Return-Path: [EMAIL PROTECTED] X-Mailer: PHP/5.2.4 MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-encoding: 7bit as you can see my Return-Path is still pointing on the wrong direction :-( any other idea ? A. On Wed, Mar 12, 2008 at 4:11 PM, spacemarc [EMAIL PROTECTED] wrote: 2008/3/12, Daniel Brown [EMAIL PROTECTED]: You have the From: header parameters reversed. Try this: ? $headers = From: .$fromname. .$email.\r\n; $headers .= Reply-To: .$email.\r\n; $headers .= X-Mailer: PHP/.phpversion().\r\n; /* */ ? you can add these headers: $header = From: $fromname$email\n; $header .= Reply-To: $email\n; $header .= Return-Path: $email\n; $header .= X-Mailer: PHP/ . phpversion() . \n; $header .= MIME-Version: 1.0\n; $header .= Content-type: text/plain; charset=iso-8859-1\n; $header .= Content-Transfer-encoding: 7bit\n; Try it. -- Scripts: http://www.spacemarc.it -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] mail function and headers
as you can see my Return-Path is still pointing on the wrong direction :-( any other idea ? return-path is set with the 5th mail() param: mail($to, $subject, $body, $headers, '[EMAIL PROTECTED]'); -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php