Re: [PHP] mail() function on Windows (WAMP Server)
On Thu, Jan 6, 2011 at 15:27, David Armstrong darmstrong...@gmail.com wrote: I'm in the process of helping some developers port their php application from Linux to Windows (I know, string me up from the flag pole later). I have setup WAMP and everything is working fine with the exception of the mail() function. The code was originally developed on Linux and leveraged sendmail for the mail() function. What can I do to allow the php code to send mail from Windows? I have already tried installing the IIS SMTP service and that has not worked so far. The Windows box is Server 2008 R2 Standard, so IIS is 7.5 with the IIS 6.0 SMTP component. Did you update your php.ini on the WIMP/WAMP box to use SMTPm and to properly configure it for the server? -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() function on Windows (WAMP Server)
On Thu, Jan 6, 2011 at 15:50, David Armstrong darmstrong...@gmail.com wrote: I set the following parameters [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = localhost ; http://php.net/smtp-port smtp_port = 25 sendmail_from = valid account here Per list rules, please hit reply-all and post your response below the quoted email in the future. Thanks. Did you set these as such before or after you last tested? And did you restart Apache/IIS after saving your changes to the php.ini file? And lastly, are you certain you edited the correct php.ini file? If accessing the script via the web, check out the Configuration File Path and, specifically, the Loaded Configuration File entries in your phpinfo() output. -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() function on Windows (WAMP Server)
I modified the php.ini in both the apache/bin directory, and also the php directory. Is there some way to get a trace of the code execution? The SMTP log files are completely worthless. They do not show any sort of connection attempt. On Thu, Jan 6, 2011 at 12:58 PM, Daniel Brown danbr...@php.net wrote: On Thu, Jan 6, 2011 at 15:50, David Armstrong darmstrong...@gmail.com wrote: I set the following parameters [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = localhost ; http://php.net/smtp-port smtp_port = 25 sendmail_from = valid account here Per list rules, please hit reply-all and post your response below the quoted email in the future. Thanks. Did you set these as such before or after you last tested? And did you restart Apache/IIS after saving your changes to the php.ini file? And lastly, are you certain you edited the correct php.ini file? If accessing the script via the web, check out the Configuration File Path and, specifically, the Loaded Configuration File entries in your phpinfo() output. -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/
Re: [PHP] mail() function on Windows (WAMP Server)
On Thu, Jan 6, 2011 at 16:02, David Armstrong darmstrong...@gmail.com wrote: I modified the php.ini in both the apache/bin directory, and also the php directory. Is there some way to get a trace of the code execution? The SMTP log files are completely worthless. They do not show any sort of connection attempt. Per list rules, please hit reply-all and post your response below the quoted email in the future. Thanks. You can do a debug_print_backtrace()[1] call right after the call to mail(), or you can use a profiler like Xdebug[2]. You can also check the Apache error log to see if anything popped up. It'll be more helpful if you have error_reporting set to E_ALL, mind you. If you just want to see if mail() is encountering any errors itself, wrap the call in an `if` condition block: ?php if (!mail($to,$subject,$body,$headers)) { die('Call to mail() failed in '.__FILE__.'#'.(__LINE__ - 1).'.'.PHP_EOL); } ? -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() function on Windows (WAMP Server)
Thanks Daniel. I will suggest that to the developer and see if we can get some useful information to further the troubleshooting process. On Thu, Jan 6, 2011 at 1:08 PM, Daniel Brown danbr...@php.net wrote: On Thu, Jan 6, 2011 at 16:02, David Armstrong darmstrong...@gmail.com wrote: I modified the php.ini in both the apache/bin directory, and also the php directory. Is there some way to get a trace of the code execution? The SMTP log files are completely worthless. They do not show any sort of connection attempt. Per list rules, please hit reply-all and post your response below the quoted email in the future. Thanks. You can do a debug_print_backtrace()[1] call right after the call to mail(), or you can use a profiler like Xdebug[2]. You can also check the Apache error log to see if anything popped up. It'll be more helpful if you have error_reporting set to E_ALL, mind you. If you just want to see if mail() is encountering any errors itself, wrap the call in an `if` condition block: ?php if (!mail($to,$subject,$body,$headers)) { die('Call to mail() failed in '.__FILE__.'#'.(__LINE__ - 1).'.'.PHP_EOL); } ? -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/
Re: [PHP] mail() function on Windows (WAMP Server)
On Thu, Jan 6, 2011 at 16:10, David Armstrong darmstrong...@gmail.com wrote: Thanks Daniel. I will suggest that to the developer and see if we can get some useful information to further the troubleshooting process. Per list rules, please hit reply-all and post your response below the quoted email in the future. Thanks. You bet. Sorry about the missing references from the other email, by the way. I was on the phone and clicked Send a bit too hastily. ^1: http://php.net/debug_print_backtrace ^2: http://xdebug.org/ -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() + localhost
On Thu, Jul 1, 2010 at 9:09 AM, Shreyas Agasthya shreya...@gmail.com wrote: Also, when the comment says that you need to 'configure' your php.ini, which .ini should I modify? The reason being, I see that file in two locations, apparently. (i) C:\Program Files\EasyPHP 3.0\apache (ii) C:\Program Files\EasyPHP 3.0\conf_files Call this in a script running under your web server: http://www.php.net/phpinfo Alternatively, you could also look at these: http://www.php.net/php-ini-loaded-file http://www.php.net/php-ini-scanned-files Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() + localhost
On Thu, Jul 1, 2010 at 09:09, Shreyas Agasthya shreya...@gmail.com wrote: All I am trying to do is send a mail from my localhost to my Gmail ID. I read stuff about how the SMTP port should be accessible; should be open et al. My set-up is very simple: 1. Using Easy PHP. 2. Windows XP 3.) An SMTP server, I hope...? Also, when the comment says that you need to 'configure' your php.ini, which .ini should I modify? The reason being, I see that file in two locations, apparently. (i) C:\Program Files\EasyPHP 3.0\apache (ii) C:\Program Files\EasyPHP 3.0\conf_files In a browser, check the output of phpinfo() - specifically, the value for Loaded Configuration File - and modify that, as the other may be for the PHP CLI, another installed component using a local override, or may not even be used at all. *My php.ini (will remove the semi-colon)* * * ; For Win32 only. ;SMTP = localhost ;smtp_port = 25 Uncomment the two lines above. ; For Win32 only. ;sendmail_from = m...@example.com You don't *need* to uncomment and set the `sendmail_from` option, as long as you set an explicit `From` header in your code. More on that after your snippet. *My code: * * * * ?php * $from= shreya...@gmail.com; $to =shreya...@gmail.com; $subject = PHP Testing; $message = Test Me; mail ($to,$subject,$message,'From:'.$from); ? Your code should be modified just a bit for better conformance and portability, but I understand that you're just using it as a test. After following the suggestions above (and remembering to restart Apache, of course), try this: ?php $from = sherya...@gmail.com; // Gmail allows (\+[a-z0-9\.\-_]+) appended to your username to filter emails in your Gmail box. $to = shreyasbr+phpt...@gmail.com; // This will append (at the moment, my local time) 1 Jul 2010, 09:27:23 $subject = PHP Testing .date(j M Y, H:i:s); $message = Test Me.; // Create your headers, remembering to terminate each line with CRLF (\r\n) to comply with RFC [2]821. $headers = From: .$from.\r\n; $headers .= X-Mailer: PHP/.phpversion().\r\n; // Send it, or inform us of an error. No need to use a -f flag here. if (!mail($to,$subject,$body,$headers)) { echo Ah, crap. Something's SNAFU'd here.; exit(-1); } ? -- /Daniel P. Brown UNADVERTISED DEDICATED SERVER SPECIALS SAME-DAY SETUP Just ask me what we're offering today! daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() + localhost
Erm... understood. I modified the changes to look like this in the php.ini file (the right one based on the output of phpinfo()). 3) *smtp = smtp.gmail.com* *smtp_port = 587* * * *I get : Failed to connect to mailserver at localhost port 587, verify your SMTP and smtp_port setting in php.ini* * * Regards, Shreyas On Thu, Jul 1, 2010 at 7:03 PM, Daniel Brown danbr...@php.net wrote: On Thu, Jul 1, 2010 at 09:09, Shreyas Agasthya shreya...@gmail.com wrote: All I am trying to do is send a mail from my localhost to my Gmail ID. I read stuff about how the SMTP port should be accessible; should be open et al. My set-up is very simple: 1. Using Easy PHP. 2. Windows XP 3.) An SMTP server, I hope...? Also, when the comment says that you need to 'configure' your php.ini, which .ini should I modify? The reason being, I see that file in two locations, apparently. (i) C:\Program Files\EasyPHP 3.0\apache (ii) C:\Program Files\EasyPHP 3.0\conf_files In a browser, check the output of phpinfo() - specifically, the value for Loaded Configuration File - and modify that, as the other may be for the PHP CLI, another installed component using a local override, or may not even be used at all. *My php.ini (will remove the semi-colon)* * * ; For Win32 only. ;SMTP = localhost ;smtp_port = 25 Uncomment the two lines above. ; For Win32 only. ;sendmail_from = m...@example.com You don't *need* to uncomment and set the `sendmail_from` option, as long as you set an explicit `From` header in your code. More on that after your snippet. *My code: * * * * ?php * $from= shreya...@gmail.com; $to =shreya...@gmail.com; $subject = PHP Testing; $message = Test Me; mail ($to,$subject,$message,'From:'.$from); ? Your code should be modified just a bit for better conformance and portability, but I understand that you're just using it as a test. After following the suggestions above (and remembering to restart Apache, of course), try this: ?php $from = sherya...@gmail.com; // Gmail allows (\+[a-z0-9\.\-_]+) appended to your username to filter emails in your Gmail box. $to = shreyasbr+phpt...@gmail.com shreyasbr%2bphpt...@gmail.com; // This will append (at the moment, my local time) 1 Jul 2010, 09:27:23 $subject = PHP Testing .date(j M Y, H:i:s); $message = Test Me.; // Create your headers, remembering to terminate each line with CRLF (\r\n) to comply with RFC [2]821. $headers = From: .$from.\r\n; $headers .= X-Mailer: PHP/.phpversion().\r\n; // Send it, or inform us of an error. No need to use a -f flag here. if (!mail($to,$subject,$body,$headers)) { echo Ah, crap. Something's SNAFU'd here.; exit(-1); } ? -- /Daniel P. Brown UNADVERTISED DEDICATED SERVER SPECIALS SAME-DAY SETUP Just ask me what we're offering today! daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ -- Regards, Shreyas Agasthya
Re: [PHP] mail() + localhost
Spoke too fast. Fixed that (SMTP has to be uppercase) Now it is : *SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. c15sm7128213rvi.11* On Thu, Jul 1, 2010 at 7:25 PM, Shreyas Agasthya shreya...@gmail.comwrote: Erm... understood. I modified the changes to look like this in the php.ini file (the right one based on the output of phpinfo()). 3) *smtp = smtp.gmail.com* *smtp_port = 587* * * *I get : Failed to connect to mailserver at localhost port 587, verify your SMTP and smtp_port setting in php.ini* * * Regards, Shreyas On Thu, Jul 1, 2010 at 7:03 PM, Daniel Brown danbr...@php.net wrote: On Thu, Jul 1, 2010 at 09:09, Shreyas Agasthya shreya...@gmail.com wrote: All I am trying to do is send a mail from my localhost to my Gmail ID. I read stuff about how the SMTP port should be accessible; should be open et al. My set-up is very simple: 1. Using Easy PHP. 2. Windows XP 3.) An SMTP server, I hope...? Also, when the comment says that you need to 'configure' your php.ini, which .ini should I modify? The reason being, I see that file in two locations, apparently. (i) C:\Program Files\EasyPHP 3.0\apache (ii) C:\Program Files\EasyPHP 3.0\conf_files In a browser, check the output of phpinfo() - specifically, the value for Loaded Configuration File - and modify that, as the other may be for the PHP CLI, another installed component using a local override, or may not even be used at all. *My php.ini (will remove the semi-colon)* * * ; For Win32 only. ;SMTP = localhost ;smtp_port = 25 Uncomment the two lines above. ; For Win32 only. ;sendmail_from = m...@example.com You don't *need* to uncomment and set the `sendmail_from` option, as long as you set an explicit `From` header in your code. More on that after your snippet. *My code: * * * * ?php * $from= shreya...@gmail.com; $to =shreya...@gmail.com; $subject = PHP Testing; $message = Test Me; mail ($to,$subject,$message,'From:'.$from); ? Your code should be modified just a bit for better conformance and portability, but I understand that you're just using it as a test. After following the suggestions above (and remembering to restart Apache, of course), try this: ?php $from = sherya...@gmail.com; // Gmail allows (\+[a-z0-9\.\-_]+) appended to your username to filter emails in your Gmail box. $to = shreyasbr+phpt...@gmail.com shreyasbr%2bphpt...@gmail.com; // This will append (at the moment, my local time) 1 Jul 2010, 09:27:23 $subject = PHP Testing .date(j M Y, H:i:s); $message = Test Me.; // Create your headers, remembering to terminate each line with CRLF (\r\n) to comply with RFC [2]821. $headers = From: .$from.\r\n; $headers .= X-Mailer: PHP/.phpversion().\r\n; // Send it, or inform us of an error. No need to use a -f flag here. if (!mail($to,$subject,$body,$headers)) { echo Ah, crap. Something's SNAFU'd here.; exit(-1); } ? -- /Daniel P. Brown UNADVERTISED DEDICATED SERVER SPECIALS SAME-DAY SETUP Just ask me what we're offering today! daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ -- Regards, Shreyas Agasthya -- Regards, Shreyas Agasthya
Re: [PHP] mail() + localhost
On Thu, Jul 1, 2010 at 10:02, Shreyas Agasthya shreya...@gmail.com wrote: Spoke too fast. Fixed that (SMTP has to be uppercase) Now it is : *SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. c15sm7128213rvi.11* (Quick note: per the list guidelines, please don't top-post in threads.) That error message is because you're trying to connect to an SMTPS (secure, SSL-encrypted SMTP) server using plain text, which won't work. If you have a plain SMTP server running, try that to get one thing resolved at a time. Change the port to 25 in your php.ini (and, again, restart Apache) if plain SMTP is available on the default port. -- /Daniel P. Brown UNADVERTISED DEDICATED SERVER SPECIALS SAME-DAY SETUP Just ask me what we're offering today! daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() + localhost
Not sure where I am top-posting. I posted to my own mail so that one gets to know the latest. Nevertheless, I wouldn't go against the guidelines as I completely understand the havoc that it can create. The port is 587 as per Google; SMTP that I am using is Google's (anything wrong here?). If there is a rudimentary mistake that I am doing, please guide me. Regards, Shreyas On Thu, Jul 1, 2010 at 7:46 PM, Daniel Brown danbr...@php.net wrote: On Thu, Jul 1, 2010 at 10:02, Shreyas Agasthya shreya...@gmail.com wrote: Spoke too fast. Fixed that (SMTP has to be uppercase) Now it is : *SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. c15sm7128213rvi.11* (Quick note: per the list guidelines, please don't top-post in threads.) That error message is because you're trying to connect to an SMTPS (secure, SSL-encrypted SMTP) server using plain text, which won't work. If you have a plain SMTP server running, try that to get one thing resolved at a time. Change the port to 25 in your php.ini (and, again, restart Apache) if plain SMTP is available on the default port. -- /Daniel P. Brown UNADVERTISED DEDICATED SERVER SPECIALS SAME-DAY SETUP Just ask me what we're offering today! daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ -- Regards, Shreyas Agasthya
Re: [PHP] mail() + localhost
Trying again; most likely I cannot do this without SSL. --Shreyas On Thu, Jul 1, 2010 at 8:42 PM, Shreyas Agasthya shreya...@gmail.comwrote: Not sure where I am top-posting. I posted to my own mail so that one gets to know the latest. Nevertheless, I wouldn't go against the guidelines as I completely understand the havoc that it can create. The port is 587 as per Google; SMTP that I am using is Google's (anything wrong here?). If there is a rudimentary mistake that I am doing, please guide me. Regards, Shreyas On Thu, Jul 1, 2010 at 7:46 PM, Daniel Brown danbr...@php.net wrote: On Thu, Jul 1, 2010 at 10:02, Shreyas Agasthya shreya...@gmail.com wrote: Spoke too fast. Fixed that (SMTP has to be uppercase) Now it is : *SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. c15sm7128213rvi.11* (Quick note: per the list guidelines, please don't top-post in threads.) That error message is because you're trying to connect to an SMTPS (secure, SSL-encrypted SMTP) server using plain text, which won't work. If you have a plain SMTP server running, try that to get one thing resolved at a time. Change the port to 25 in your php.ini (and, again, restart Apache) if plain SMTP is available on the default port. -- /Daniel P. Brown UNADVERTISED DEDICATED SERVER SPECIALS SAME-DAY SETUP Just ask me what we're offering today! daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ -- Regards, Shreyas Agasthya -- Regards, Shreyas Agasthya
Re: [PHP] mail command failing
On Tue, 2010-06-29 at 10:00 -0700, Mike Wright wrote: Hi all, I'm very puzzled by this. I've been using the php mail command for years but now I can't get it to work and can't figure out how to diagnose the problem. The code below was copied from the manual (addresses changed, etc); php.ini has safe_mode off; binary is at /usr/sbin/sendmail. ?php ini_set(SMTP,localhost ); ini_set('sendmail_from', 'mike.wri...@mailinator.com'); $name = Mike Wright; //senders name $email = mike.wri...@mailinator.com; //senders e-mail adress $recipient = mike.wri...@mailinator.com; //recipient $body = The text for the mail...; //mail body $subject = Subject for review; //subject $header = From: $name $email\r\n; //optional headerfields $echo = mail($recipient, $subject, $body, $header) ? 'success':'fail'; echo br/br/$echo; I can access the mail server with /usr/bin/mailx and by telnet localhost 25. I can also send mail using php by using 'exec ( echo $body | mailx -s $subject $recipient)'. php-5.2.29 on fedora10 with apache 2.2.14. Can this be selinux related? Any ideas or troubleshooting tips? Thanks, Mike Wright The first ini_set variable you're setting I believe will only work for a Windows server. Aside from that, yes SELinux does prevent the mail command from sending mail by default. I'm using Fedora 11, so I assume it will be similar; there are config tools for setting SELinux policies, or you could even turn it off (not advised on a live server). As a test, try turning it off temporarily just to see if it is the culprit, then you can determine what policy changes need to be made. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] mail command failing
Ashley Sheridan wrote: On Tue, 2010-06-29 at 10:00 -0700, Mike Wright wrote: Hi all, I'm very puzzled by this. I've been using the php mail command for years but now I can't get it to work and can't figure out how to diagnose the problem. php-5.2.29 on fedora10 with apache 2.2.14. Can this be selinux related? The first ini_set variable you're setting I believe will only work for a Windows server. Aside from that, yes SELinux does prevent the mail command from sending mail by default. I'm using Fedora 11, so I assume it will be similar; there are config tools for setting SELinux policies, or you could even turn it off (not advised on a live server). As a test, try turning it off temporarily just to see if it is the culprit, then you can determine what policy changes need to be made. Thanks, Ash, but no cigar. Selinux is set disabled. Absolutely baffled and confounded that there doesn't seem to be a way to diagnose the problem. Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail command failing
From: Ashley Sheridan On Tue, 2010-06-29 at 10:00 -0700, Mike Wright wrote: Hi all, I'm very puzzled by this. I've been using the php mail command for years but now I can't get it to work and can't figure out how to diagnose the problem. The code below was copied from the manual (addresses changed, etc); php.ini has safe_mode off; binary is at /usr/sbin/sendmail. ?php ini_set(SMTP,localhost ); ini_set('sendmail_from', 'mike.wri...@mailinator.com'); $name = Mike Wright; //senders name $email = mike.wri...@mailinator.com; //senders e-mail adress $recipient = mike.wri...@mailinator.com; //recipient $body = The text for the mail...; //mail body $subject = Subject for review; //subject $header = From: $name $email\r\n; //optional headerfields $echo = mail($recipient, $subject, $body, $header) ? 'success':'fail'; echo br/br/$echo; I can access the mail server with /usr/bin/mailx and by telnet localhost 25. I can also send mail using php by using 'exec ( echo $body | mailx -s $subject $recipient)'. php-5.2.29 on fedora10 with apache 2.2.14. Can this be selinux related? Any ideas or troubleshooting tips? The first ini_set variable you're setting I believe will only work for a Windows server. Aside from that, yes SELinux does prevent the mail command from sending mail by default. I'm using Fedora 11, so I assume it will be similar; there are config tools for setting SELinux policies, or you could even turn it off (not advised on a live server). As a test, try turning it off temporarily just to see if it is the culprit, then you can determine what policy changes need to be made. Don't turn it off, set it for Permissive mode. It will both allow the connection and log why it wouldn't allow it in normal operation. Then you can review the logs and make the necessary adjustments. Bob McConnell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail command failing
On Tue, 2010-06-29 at 10:27 -0700, Mike Wright wrote: Ashley Sheridan wrote: On Tue, 2010-06-29 at 10:00 -0700, Mike Wright wrote: Hi all, I'm very puzzled by this. I've been using the php mail command for years but now I can't get it to work and can't figure out how to diagnose the problem. php-5.2.29 on fedora10 with apache 2.2.14. Can this be selinux related? The first ini_set variable you're setting I believe will only work for a Windows server. Aside from that, yes SELinux does prevent the mail command from sending mail by default. I'm using Fedora 11, so I assume it will be similar; there are config tools for setting SELinux policies, or you could even turn it off (not advised on a live server). As a test, try turning it off temporarily just to see if it is the culprit, then you can determine what policy changes need to be made. Thanks, Ash, but no cigar. Selinux is set disabled. Absolutely baffled and confounded that there doesn't seem to be a way to diagnose the problem. Mike I can only guess that PHP somehow isn't seeing the sendmail program for some reason. Have you compared the output of a phpinfo() call on this system and another where it is working to see if there are any obvious differences in the server setups? Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Mail Function Using PEAR Issues
On 21 April 2010 04:25, Alice Wei aj...@alumni.iu.edu wrote: Well, from my experience with Ubuntu, looks like that it does not do that. Unless, I am doing it wrong? So did you try using the 'smtp' backend and passing all the connection details rather than 'mail'? -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Function Using PEAR Issues
The PEAR Mail package does not fall back from one mechanism to another if the first fails. On Tue, Apr 20, 2010 at 9:16 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-04-20 at 22:17 +0200, Peter Lind wrote: On 20 April 2010 20:17, Alice Wei aj...@alumni.iu.edu wrote: From: peter.e.l...@gmail.com Date: Mon, 19 Apr 2010 10:15:08 +0200 Subject: Re: [PHP] Mail Function Using PEAR Issues To: aj...@alumni.iu.edu CC: php-general@lists.php.net Most, if not all, mail servers keep log files. You should look for the log files to see if the mail server has sent your mail properly or is experiencing problems (those may not feed back into PHP). Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 /hype You know where I can find that? I use Evolution Mail, a mail server? I found it through Ubuntu yesterday. Here is the link: http://projects.gnome.org/evolution/ It asks me to put in the type of mail service I used, it grabbed Google, which is smtp.google.com. I still cannot send mail. I start to wonder what is going on. Alice Evolution is a mail client, not a mail server. Apart from that, you're using the 'mail' (PHPs mail function) as the backend mailer in your PEAR script - try using smtp instead and pass the SMTP config data you normally use. Have a look at http://pear.php.net/manual/en/package.mail.mail.factory.php - the smtp part. Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 /hype If you've got Pear on Ubuntu, can Pear not default to sendmail if no SMTP connection is set up? Thanks, Ash http://www.ashleysheridan.co.uk -- http://blogs.linux.ie/kenguest/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail Function Using PEAR Issues
From: peter.e.l...@gmail.com Date: Wed, 21 Apr 2010 09:29:19 +0200 Subject: Re: [PHP] Mail Function Using PEAR Issues To: aj...@alumni.iu.edu CC: a...@ashleysheridan.co.uk; php-general@lists.php.net On 21 April 2010 04:25, Alice Wei aj...@alumni.iu.edu wrote: Well, from my experience with Ubuntu, looks like that it does not do that. Unless, I am doing it wrong? So did you try using the 'smtp' backend and passing all the connection details rather than 'mail'? I have mentioned several posts earlier that I have done nothing about my php.ini file. From what you said, since I use U-Verse, am I supposed to do something as described here: http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf I thought with PEAR, you don't need to do that anymore. Or, am I wrong? Alice _ The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. http://www.windowslive.com/campaign/thenewbusy?tile=multicalendarocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5
RE: [PHP] Mail Function Using PEAR Issues
Date: Wed, 21 Apr 2010 22:01:03 +0200 Subject: Re: [PHP] Mail Function Using PEAR Issues To: aj...@alumni.iu.edu CC: a...@ashleysheridan.co.uk; php-general@lists.php.net On 21 April 2010 21:58, Alice Wei aj...@alumni.iu.edu wrote: From: peter.e.l...@gmail.com Date: Wed, 21 Apr 2010 21:51:31 +0200 Subject: Re: [PHP] Mail Function Using PEAR Issues To: aj...@alumni.iu.edu CC: a...@ashleysheridan.co.uk; php-general@lists.php.net On 21 April 2010 18:44, Alice Wei aj...@alumni.iu.edu wrote: I have mentioned several posts earlier that I have done nothing about my php.ini file. From what you said, since I use U-Verse, am I supposed to do something as described here: http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf I thought with PEAR, you don't need to do that anymore. Or, am I wrong? Read the PEAR documentation: http://pear.php.net/manual/en/package.mail.mail.factory.php You can use other backends than just 'mail' - try using the smtp and fill in your smtp settings as needed. Regards Peter I saw something like that on http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm, and this is probably what you are talking about? $smtp = Mail::factory('smtp', array ('host' = $host, 'auth' = true, 'username' = $username, 'password' = $password)); Do I still need to install a mail server? I have Evolution Mail on my Linux box, and looks like that is a client and not a server. Or, can I use any of the mail smtp setup, like Google? Or, do use some authentication information from http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf, since I use U-Verse at home? Yes, the example you provide is the right direction - you can put in the smtp details you use to connect from Evolution to GMail, you don't need to setup a separate smtp server on your system. Regards Peter Well, hold it. I have edited my code to hold the information as we have discussed earlier, and this is the error I have now: Warning: include_once(Net/SMTP.php) [function.include-once]: failed to open stream: No such file or directory in /usr/share/php/Mail/smtp.php on line 348 Warning: include_once() [function.include]: Failed opening 'Net/SMTP.php' for inclusion (include_path='.:/usr/share/php') in /usr/share/php/Mail/smtp.php on line 348 Fatal error: Class 'Net_SMTP' not found in /usr/share/php/Mail/smtp.php on line 349 I am not sure what this means. If I have installed pear correctly, what else do I have to do here? I can see that I have some significant error messages than not getting anything at all. Thanks for your help. Alice _ Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1
Re: [PHP] Mail Function Using PEAR Issues
you have to install the net_smtp package, simply with this command: $ pear install net_smtp-1.4.2 (which will explicitly install version 1.4.2 of Net_SMTP) If that doesn't work. for whatever reason, you could download the package manually from http://pear.php.net/package/Net_SMTP/download and install it by hand; though for reasons I've outlined in a previous post to this list I'd suggest you use the pear installer. On Thu, Apr 22, 2010 at 12:12 AM, Alice Wei aj...@alumni.iu.edu wrote: Date: Wed, 21 Apr 2010 22:01:03 +0200 Subject: Re: [PHP] Mail Function Using PEAR Issues To: aj...@alumni.iu.edu CC: a...@ashleysheridan.co.uk; php-general@lists.php.net On 21 April 2010 21:58, Alice Wei aj...@alumni.iu.edu wrote: From: peter.e.l...@gmail.com Date: Wed, 21 Apr 2010 21:51:31 +0200 Subject: Re: [PHP] Mail Function Using PEAR Issues To: aj...@alumni.iu.edu CC: a...@ashleysheridan.co.uk; php-general@lists.php.net On 21 April 2010 18:44, Alice Wei aj...@alumni.iu.edu wrote: I have mentioned several posts earlier that I have done nothing about my php.ini file. From what you said, since I use U-Verse, am I supposed to do something as described here: http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf I thought with PEAR, you don't need to do that anymore. Or, am I wrong? Read the PEAR documentation: http://pear.php.net/manual/en/package.mail.mail.factory.php You can use other backends than just 'mail' - try using the smtp and fill in your smtp settings as needed. Regards Peter I saw something like that on http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm, and this is probably what you are talking about? $smtp = Mail::factory('smtp', array ('host' = $host, 'auth' = true, 'username' = $username, 'password' = $password)); Do I still need to install a mail server? I have Evolution Mail on my Linux box, and looks like that is a client and not a server. Or, can I use any of the mail smtp setup, like Google? Or, do use some authentication information from http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf, since I use U-Verse at home? Yes, the example you provide is the right direction - you can put in the smtp details you use to connect from Evolution to GMail, you don't need to setup a separate smtp server on your system. Regards Peter Well, hold it. I have edited my code to hold the information as we have discussed earlier, and this is the error I have now: Warning: include_once(Net/SMTP.php) [function.include-once]: failed to open stream: No such file or directory in /usr/share/php/Mail/smtp.php on line 348 Warning: include_once() [function.include]: Failed opening 'Net/SMTP.php' for inclusion (include_path='.:/usr/share/php') in /usr/share/php/Mail/smtp.php on line 348 Fatal error: Class 'Net_SMTP' not found in /usr/share/php/Mail/smtp.php on line 349 I am not sure what this means. If I have installed pear correctly, what else do I have to do here? I can see that I have some significant error messages than not getting anything at all. Thanks for your help. Alice _ Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1 -- http://blogs.linux.ie/kenguest/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail Function Using PEAR Issues
Date: Thu, 22 Apr 2010 00:31:04 +0100 Subject: Re: [PHP] Mail Function Using PEAR Issues From: k...@linux.ie To: aj...@alumni.iu.edu CC: peter.e.l...@gmail.com; a...@ashleysheridan.co.uk; php-general@lists.php.net you have to install the net_smtp package, simply with this command: $ pear install net_smtp-1.4.2 (which will explicitly install version 1.4.2 of Net_SMTP) If that doesn't work. for whatever reason, you could download the package manually from http://pear.php.net/package/Net_SMTP/download and install it by hand; though for reasons I've outlined in a previous post to this list I'd suggest you use the pear installer. On Thu, Apr 22, 2010 at 12:12 AM, Alice Wei aj...@alumni.iu.edu wrote: Date: Wed, 21 Apr 2010 22:01:03 +0200 Subject: Re: [PHP] Mail Function Using PEAR Issues To: aj...@alumni.iu.edu CC: a...@ashleysheridan.co.uk; php-general@lists.php.net On 21 April 2010 21:58, Alice Wei aj...@alumni.iu.edu wrote: From: peter.e.l...@gmail.com Date: Wed, 21 Apr 2010 21:51:31 +0200 Subject: Re: [PHP] Mail Function Using PEAR Issues To: aj...@alumni.iu.edu CC: a...@ashleysheridan.co.uk; php-general@lists.php.net On 21 April 2010 18:44, Alice Wei aj...@alumni.iu.edu wrote: I have mentioned several posts earlier that I have done nothing about my php.ini file. From what you said, since I use U-Verse, am I supposed to do something as described here: http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf I thought with PEAR, you don't need to do that anymore. Or, am I wrong? Read the PEAR documentation: http://pear.php.net/manual/en/package.mail.mail.factory.php You can use other backends than just 'mail' - try using the smtp and fill in your smtp settings as needed. Regards Peter I saw something like that on http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm, and this is probably what you are talking about? $smtp = Mail::factory('smtp', array ('host' = $host, 'auth' = true, 'username' = $username, 'password' = $password)); Do I still need to install a mail server? I have Evolution Mail on my Linux box, and looks like that is a client and not a server. Or, can I use any of the mail smtp setup, like Google? Or, do use some authentication information from http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf, since I use U-Verse at home? Yes, the example you provide is the right direction - you can put in the smtp details you use to connect from Evolution to GMail, you don't need to setup a separate smtp server on your system. Regards Peter Well, hold it. I have edited my code to hold the information as we have discussed earlier, and this is the error I have now: Warning: include_once(Net/SMTP.php) [function.include-once]: failed to open stream: No such file or directory in /usr/share/php/Mail/smtp.php on line 348 Warning: include_once() [function.include]: Failed opening 'Net/SMTP.php' for inclusion (include_path='.:/usr/share/php') in /usr/share/php/Mail/smtp.php on line 348 Fatal error: Class 'Net_SMTP' not found in /usr/share/php/Mail/smtp.php on line 349 I am not sure what this means. If I have installed pear correctly, what else do I have to do here? I can see that I have some significant error messages than not getting anything at all. Thanks for your help. Alice _ Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1 -- http://blogs.linux.ie/kenguest/ As the time of writing this, I have installed the missing Net_SMTP pear package unto my Linux box. I have just tested it, and I have received two email messages to the desired mailbox, without having to install a mail server. Thanks for your help. I really appreciate this. Alice _ Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2
Re: [PHP] Mail Function Using PEAR Issues
On Tue, Apr 20, 2010 at 2:10 AM, David McGlone da...@dmcentral.net wrote: On Mon, 2010-04-19 at 08:25 -0400, Alice Wei wrote: I have not changed any of my SMTP settings since my new installation of PHP with Pear. So, I am not sure what the settings are supposed to be. Would I need to install anything else even when the Pear Mail package has been installed? You might, depending on if you need to use the Mail_Mime or Mail_Queue packages also (for sending emails with attachments etc etc or for sending mails in bulk). Also there's some rather nice new functionality in the more recent versions of Mail and Net_SMTP that enable you to log the ESMTP Id of mails you have submitted to a mail server (along with the SMTP greeting sent by that server when you connect to it). Alice, I never use the PEAR install from my distro, I always download and install PEAR into my working folder. The benefit of doing it this way is so that when you move your project to a different server, nothing will break and you don't have to change anything. Sometimes when I create a new project, I'll just copy the PEAR folder from an older project to the new one. The only thing you may have to change in your PHP code is the path to the PEAR libs only if you don't put them in the same place every time. When some bug is fixed or dependencies of some of those PEAR packages change I think you'll find your attitude towards that will change - there's a pear installer so you don't have to update and track the dependencies by hand - you do regularly update your packages don't you? It's smart to do so because at the very least you don't have to implement work-arounds for bugs that have been fixed in later versions of those packages - and in the worst-case scenario it means you're not using versions that have PEAR Security Advisories issued against them. I believe it's possible to have seperate pear config files per project so you're not limited to having to use the same versions of packages across all projects. If you're using more than a handful of PEAR packages in your project you might want to write your own meta-package for the project; that way you don't have to install all those packages individually; you just do something like $pear install myProject.xml and the pear installer will download and install whichever pear packages you have described in your xml file. Details on doing this are at http://pear.php.net/manual/en/guide.users.dependencytracking.php For the record, this is the example script that I submitted to http://www.web-development-blog.com/archives/php-mail-scripts-using-smtp-transport-a-guide-for-beginners/ for demonstrating how to use the PEAR packages for sending a mail with a file attached.: ?php require_once Mail.php; require_once Mail/mime.php; $from = Fred Flintstone fli...@example.com“; $to = “Barney Rubble barn...@example.net“; $subject = “Mail Subject”; $message = “this is the text of the mail, sent using PEAR’s Mail packages.”; $host = “smtp.example.com”; $port = “25″; $headers = array (‘From’ = $from, ‘To’ = $to, ‘Subject’ = $subject); $smtp = Mail::factory(’smtp’, array (‘host’ = $host, ‘port’ = $port)); $mime = new Mail_mime(); $mime-setTxtBody($message); $mime-addAttachment(“/home/ken/logo.png”, ‘image/png’); $body = $mime-get(); $mail = $smtp-send($to, $mime-headers($headers), $body); if (PEAR::isError($mail)) { echo($mail-getMessage() . “!\n”); } else { echo(“Message successfully sent to $to!\n”); echo “Queued As (ESMTP Id): “, $smtp-queued_as, “\n”; echo “Greeting From Mailserver: “, $smtp-greeting, “\n”; } ? Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- http://blogs.linux.ie/kenguest/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail Function Using PEAR Issues
From: peter.e.l...@gmail.com Date: Mon, 19 Apr 2010 10:15:08 +0200 Subject: Re: [PHP] Mail Function Using PEAR Issues To: aj...@alumni.iu.edu CC: php-general@lists.php.net Most, if not all, mail servers keep log files. You should look for the log files to see if the mail server has sent your mail properly or is experiencing problems (those may not feed back into PHP). Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 /hype You know where I can find that? I use Evolution Mail, a mail server? I found it through Ubuntu yesterday. Here is the link: http://projects.gnome.org/evolution/ It asks me to put in the type of mail service I used, it grabbed Google, which is smtp.google.com. I still cannot send mail. I start to wonder what is going on. Alice _ The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. http://www.windowslive.com/campaign/thenewbusy?tile=multicalendarocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5
Re: [PHP] Mail Function Using PEAR Issues
On 20 April 2010 20:17, Alice Wei aj...@alumni.iu.edu wrote: From: peter.e.l...@gmail.com Date: Mon, 19 Apr 2010 10:15:08 +0200 Subject: Re: [PHP] Mail Function Using PEAR Issues To: aj...@alumni.iu.edu CC: php-general@lists.php.net Most, if not all, mail servers keep log files. You should look for the log files to see if the mail server has sent your mail properly or is experiencing problems (those may not feed back into PHP). Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 /hype You know where I can find that? I use Evolution Mail, a mail server? I found it through Ubuntu yesterday. Here is the link: http://projects.gnome.org/evolution/ It asks me to put in the type of mail service I used, it grabbed Google, which is smtp.google.com. I still cannot send mail. I start to wonder what is going on. Alice Evolution is a mail client, not a mail server. Apart from that, you're using the 'mail' (PHPs mail function) as the backend mailer in your PEAR script - try using smtp instead and pass the SMTP config data you normally use. Have a look at http://pear.php.net/manual/en/package.mail.mail.factory.php - the smtp part. Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Function Using PEAR Issues
On Tue, 2010-04-20 at 22:17 +0200, Peter Lind wrote: On 20 April 2010 20:17, Alice Wei aj...@alumni.iu.edu wrote: From: peter.e.l...@gmail.com Date: Mon, 19 Apr 2010 10:15:08 +0200 Subject: Re: [PHP] Mail Function Using PEAR Issues To: aj...@alumni.iu.edu CC: php-general@lists.php.net Most, if not all, mail servers keep log files. You should look for the log files to see if the mail server has sent your mail properly or is experiencing problems (those may not feed back into PHP). Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 /hype You know where I can find that? I use Evolution Mail, a mail server? I found it through Ubuntu yesterday. Here is the link: http://projects.gnome.org/evolution/ It asks me to put in the type of mail service I used, it grabbed Google, which is smtp.google.com. I still cannot send mail. I start to wonder what is going on. Alice Evolution is a mail client, not a mail server. Apart from that, you're using the 'mail' (PHPs mail function) as the backend mailer in your PEAR script - try using smtp instead and pass the SMTP config data you normally use. Have a look at http://pear.php.net/manual/en/package.mail.mail.factory.php - the smtp part. Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 /hype If you've got Pear on Ubuntu, can Pear not default to sendmail if no SMTP connection is set up? Thanks, Ash http://www.ashleysheridan.co.uk
RE: [PHP] Mail Function Using PEAR Issues
Subject: Re: [PHP] Mail Function Using PEAR Issues From: a...@ashleysheridan.co.uk To: peter.e.l...@gmail.com CC: aj...@alumni.iu.edu; php-general@lists.php.net Date: Tue, 20 Apr 2010 21:16:03 +0100 On Tue, 2010-04-20 at 22:17 +0200, Peter Lind wrote: On 20 April 2010 20:17, Alice Wei aj...@alumni.iu.edu wrote: From: peter.e.l...@gmail.com Date: Mon, 19 Apr 2010 10:15:08 +0200 Subject: Re: [PHP] Mail Function Using PEAR Issues To: aj...@alumni.iu.edu CC: php-general@lists.php.net Most, if not all, mail servers keep log files. You should look for the log files to see if the mail server has sent your mail properly or is experiencing problems (those may not feed back into PHP). Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 /hype You know where I can find that? I use Evolution Mail, a mail server? I found it through Ubuntu yesterday. Here is the link: http://projects.gnome.org/evolution/ It asks me to put in the type of mail service I used, it grabbed Google, which is smtp.google.com. I still cannot send mail. I start to wonder what is going on. Alice Evolution is a mail client, not a mail server. Apart from that, you're using the 'mail' (PHPs mail function) as the backend mailer in your PEAR script - try using smtp instead and pass the SMTP config data you normally use. Have a look at http://pear.php.net/manual/en/package.mail.mail.factory.php - the smtp part. Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 /hype If you've got Pear on Ubuntu, can Pear not default to sendmail if no SMTP connection is set up? Well, from my experience with Ubuntu, looks like that it does not do that. Unless, I am doing it wrong? Thanks, Ash http://www.ashleysheridan.co.uk _ The New Busy is not the old busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3
RE: [PHP] Mail Function Using PEAR Issues
Subject: Re: [PHP] Mail Function Using PEAR Issues From: a...@ashleysheridan.co.uk To: peter.e.l...@gmail.com CC: aj...@alumni.iu.edu; php-general@lists.php.net Date: Tue, 20 Apr 2010 21:16:03 +0100 On Tue, 2010-04-20 at 22:17 +0200, Peter Lind wrote: On 20 April 2010 20:17, Alice Wei aj...@alumni.iu.edu wrote: From: peter.e.l...@gmail.com Date: Mon, 19 Apr 2010 10:15:08 +0200 Subject: Re: [PHP] Mail Function Using PEAR Issues To: aj...@alumni.iu.edu CC: php-general@lists.php.net Most, if not all, mail servers keep log files. You should look for the log files to see if the mail server has sent your mail properly or is experiencing problems (those may not feed back into PHP). Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 /hype You know where I can find that? I use Evolution Mail, a mail server? I found it through Ubuntu yesterday. Here is the link: http://projects.gnome.org/evolution/ It asks me to put in the type of mail service I used, it grabbed Google, which is smtp.google.com. I still cannot send mail. I start to wonder what is going on. Alice Evolution is a mail client, not a mail server. Apart from that, you're using the 'mail' (PHPs mail function) as the backend mailer in your PEAR script - try using smtp instead and pass the SMTP config data you normally use. Have a look at http://pear.php.net/manual/en/package.mail.mail.factory.php - the smtp part. Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 /hype If you've got Pear on Ubuntu, can Pear not default to sendmail if no SMTP connection is set up? Well, from my experience with Ubuntu, looks like that it does not do that. Unless, I am doing it wrong? Thanks, Ash http://www.ashleysheridan.co.uk _ Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2
Re: [PHP] Mail Function Using PEAR Issues
Most, if not all, mail servers keep log files. You should look for the log files to see if the mail server has sent your mail properly or is experiencing problems (those may not feed back into PHP). Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail Function Using PEAR Issues
Date: Sun, 18 Apr 2010 21:39:19 -0500 From: k...@daleco.biz To: aj...@alumni.iu.edu CC: k...@designdrumm.com; php-general@lists.php.net Subject: Re: [PHP] Mail Function Using PEAR Issues Alice Wei wrote: Date: Sun, 18 Apr 2010 21:02:29 -0500 From: k...@daleco.biz To: aj...@alumni.iu.edu CC: k...@designdrumm.com; php-general@lists.php.net Subject: Re: [PHP] Mail Function Using PEAR Issues Karl DeSaulniers wrote: Hey Alice, Again, try throwing the MIME in. $headers = 'MIME-Version: 1.0' . \r\n; $headers .= 'Content-type: text/html; charset=utf-8' . \r\n; Also: $headers .= 'Errors-to: myworkingemailaddr...@foo.com' . \r\n; Which I suggested on your previous thread. Also, I see you have $from set to equal localhost. Many SMTP servers will reject this I *think*, because localhost is a hostname, not a working mailbox. Try making $from equal to a real working address - possibly the same one as your Errors-to: header.. My $0.02, KDK On Apr 18, 2010, at 10:11 AM, Alice Wei wrote: Hi, After several days, I have rebuilt my system on Linux using Ubuntu, installed PEAR and such. Thankfully, when I execute the code, it no longer gives me the error that the class is not found. Yet, when I submit the form now, I can always see the confirmation message telling me that my message has been sent, but I cannot see it even in another mailbox. Here is the code: require_once(Mail.php); $mail = Mail::factory(mail); $your_name = $_POST['your_name']; $email = $_POST['email']; $question = $_POST['question']; $comments= $_POST['comments']; $submit = $_POST['submit']; $from = localhost; $to = $email; $subject = Comments; $body = From: $your_name\n E-Mail: $email\n Reason Contact: $question\n Comments:\n $comments; $host = localhost; $headers = array ('From' = $from,'To' = $to,'Subject' = $subject); $mail -send($to, $headers, $body); if (PEAR::isError($mail)) echo p . $mail-getMessage() . /p; else { echo pMessage successfully sent!/p div id='main' h1Thank You For Contacting Us/h1 pWe will contact you within the next b24 business hours/b./p pHere is what you have input:/p ulliYour Name is b . $your_name . /b/li liYour Email is b . $email . /b/li liYou contacted us because you have a b . $question . /b/li liHere are your comments: b . $comments . /b/li/ul h1Have a Nice Day!/h1/div; } } Can anyone on the list please give me some pointers on what might have been wrong here? I have not edited anything in the php.ini file regarding SMTP. Thanks. Alice Hi, Here is the revised version, and I don't think I have experienced any changes in terms of the output on the screen. Plus, I still get no email. ?php require_once(Mail.php); $mail = Mail::factory(mail); $your_name = $_POST['your_name']; $email = $_POST['email']; $question = $_POST['question']; $comments= $_POST['comments']; $submit = $_POST['submit']; $from = aj...@alumni.iu.edu; $to = elite.engl...@gmail.com; $subject = Comments; $body = From: $your_name\n E-Mail: $email\n Reason Contact: $question\n Comments:\n $comments; $headers = 'MIME-Version: 1.0' . \r\n; $headers .= 'Content-type: text/html; charset=utf-8' . \r\n; $headers .= 'Errors-to: elite.engl...@gmail.com' . \r\n; $mail -send($to, $headers, $body); if (PEAR::isError($mail)) echo p . $mail-getMessage() . /p; else { echo pMessage successfully sent!/p div id='main' h1Thank You For Contacting Us/h1 pHere is what you have input:/p ulliYour Name is b . $your_name . /b/li liYour Email is b . $email . /b/li liYou contacted us because you have a b . $question . /b/li liHere are your comments: b . $comments . /b/li/ul h1Have a Nice Day!/h1/div; } I have made sure that my $from and $to addresses are different, Could there be anything else wrong here? I have not edited anything in php.ini regarding this issue. Would I need to? Well, it's a Good Thing(tm) to know what those settings are. Have they changed since your last thread? I have not changed any of my SMTP settings since my new installation of PHP with Pear. So, I am not sure what the settings are supposed to be. Would I need to install anything else even when the Pear Mail package has been installed? Alice _ The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. http://www.windowslive.com/campaign/thenewbusy?tile=multicalendarocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5
RE: [PHP] Mail Function Using PEAR Issues
On Mon, 2010-04-19 at 08:25 -0400, Alice Wei wrote: I have not changed any of my SMTP settings since my new installation of PHP with Pear. So, I am not sure what the settings are supposed to be. Would I need to install anything else even when the Pear Mail package has been installed? Alice, I never use the PEAR install from my distro, I always download and install PEAR into my working folder. The benefit of doing it this way is so that when you move your project to a different server, nothing will break and you don't have to change anything. Sometimes when I create a new project, I'll just copy the PEAR folder from an older project to the new one. The only thing you may have to change in your PHP code is the path to the PEAR libs only if you don't put them in the same place every time. Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Function Using PEAR Issues
Hey Alice, Again, try throwing the MIME in. $headers = 'MIME-Version: 1.0' . \r\n; $headers .= 'Content-type: text/html; charset=utf-8' . \r\n; Karl On Apr 18, 2010, at 10:11 AM, Alice Wei wrote: Hi, After several days, I have rebuilt my system on Linux using Ubuntu, installed PEAR and such. Thankfully, when I execute the code, it no longer gives me the error that the class is not found. Yet, when I submit the form now, I can always see the confirmation message telling me that my message has been sent, but I cannot see it even in another mailbox. Here is the code: require_once(Mail.php); $mail = Mail::factory(mail); $your_name = $_POST['your_name']; $email = $_POST['email']; $question = $_POST['question']; $comments= $_POST['comments']; $submit = $_POST['submit']; $from = localhost; $to = $email; $subject = Comments; $body = From: $your_name\n E-Mail: $email\n Reason Contact: $question\n Comments:\n $comments; $host = localhost; $headers = array ('From' = $from,'To' = $to,'Subject' = $subject); $mail -send($to, $headers, $body); if (PEAR::isError($mail)) echo p . $mail-getMessage() . /p; else { echo pMessage successfully sent!/p div id='main' h1Thank You For Contacting Us/h1 pWe will contact you within the next b24 business hours/ b./p pHere is what you have input:/p ulliYour Name is b . $your_name . /b/li liYour Email is b . $email . /b/li liYou contacted us because you have a b . $question . /b/li liHere are your comments: b . $comments . /b/ li/ul h1Have a Nice Day!/h1/div; } } Can anyone on the list please give me some pointers on what might have been wrong here? I have not edited anything in the php.ini file regarding SMTP. Thanks. Alice _ The New Busy is not the old busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy? ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3 Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Function Using PEAR Issues
Karl DeSaulniers wrote: Hey Alice, Again, try throwing the MIME in. $headers = 'MIME-Version: 1.0' . \r\n; $headers .= 'Content-type: text/html; charset=utf-8' . \r\n; Also: $headers .= 'Errors-to: myworkingemailaddr...@foo.com' . \r\n; Which I suggested on your previous thread. Also, I see you have $from set to equal localhost. Many SMTP servers will reject this I *think*, because localhost is a hostname, not a working mailbox. Try making $from equal to a real working address - possibly the same one as your Errors-to: header.. My $0.02, KDK On Apr 18, 2010, at 10:11 AM, Alice Wei wrote: Hi, After several days, I have rebuilt my system on Linux using Ubuntu, installed PEAR and such. Thankfully, when I execute the code, it no longer gives me the error that the class is not found. Yet, when I submit the form now, I can always see the confirmation message telling me that my message has been sent, but I cannot see it even in another mailbox. Here is the code: require_once(Mail.php); $mail = Mail::factory(mail); $your_name = $_POST['your_name']; $email = $_POST['email']; $question = $_POST['question']; $comments= $_POST['comments']; $submit = $_POST['submit']; $from = localhost; $to = $email; $subject = Comments; $body = From: $your_name\n E-Mail: $email\n Reason Contact: $question\n Comments:\n $comments; $host = localhost; $headers = array ('From' = $from,'To' = $to,'Subject' = $subject); $mail -send($to, $headers, $body); if (PEAR::isError($mail)) echo p . $mail-getMessage() . /p; else { echo pMessage successfully sent!/p div id='main' h1Thank You For Contacting Us/h1 pWe will contact you within the next b24 business hours/b./p pHere is what you have input:/p ulliYour Name is b . $your_name . /b/li liYour Email is b . $email . /b/li liYou contacted us because you have a b . $question . /b/li liHere are your comments: b . $comments . /b/li/ul h1Have a Nice Day!/h1/div; } } Can anyone on the list please give me some pointers on what might have been wrong here? I have not edited anything in the php.ini file regarding SMTP. Thanks. Alice -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail Function Using PEAR Issues
Date: Sun, 18 Apr 2010 21:02:29 -0500 From: k...@daleco.biz To: aj...@alumni.iu.edu CC: k...@designdrumm.com; php-general@lists.php.net Subject: Re: [PHP] Mail Function Using PEAR Issues Karl DeSaulniers wrote: Hey Alice, Again, try throwing the MIME in. $headers = 'MIME-Version: 1.0' . \r\n; $headers .= 'Content-type: text/html; charset=utf-8' . \r\n; Also: $headers .= 'Errors-to: myworkingemailaddr...@foo.com' . \r\n; Which I suggested on your previous thread. Also, I see you have $from set to equal localhost. Many SMTP servers will reject this I *think*, because localhost is a hostname, not a working mailbox. Try making $from equal to a real working address - possibly the same one as your Errors-to: header.. My $0.02, KDK On Apr 18, 2010, at 10:11 AM, Alice Wei wrote: Hi, After several days, I have rebuilt my system on Linux using Ubuntu, installed PEAR and such. Thankfully, when I execute the code, it no longer gives me the error that the class is not found. Yet, when I submit the form now, I can always see the confirmation message telling me that my message has been sent, but I cannot see it even in another mailbox. Here is the code: require_once(Mail.php); $mail = Mail::factory(mail); $your_name = $_POST['your_name']; $email = $_POST['email']; $question = $_POST['question']; $comments= $_POST['comments']; $submit = $_POST['submit']; $from = localhost; $to = $email; $subject = Comments; $body = From: $your_name\n E-Mail: $email\n Reason Contact: $question\n Comments:\n $comments; $host = localhost; $headers = array ('From' = $from,'To' = $to,'Subject' = $subject); $mail -send($to, $headers, $body); if (PEAR::isError($mail)) echo p . $mail-getMessage() . /p; else { echo pMessage successfully sent!/p div id='main' h1Thank You For Contacting Us/h1 pWe will contact you within the next b24 business hours/b./p pHere is what you have input:/p ulliYour Name is b . $your_name . /b/li liYour Email is b . $email . /b/li liYou contacted us because you have a b . $question . /b/li liHere are your comments: b . $comments . /b/li/ul h1Have a Nice Day!/h1/div; } } Can anyone on the list please give me some pointers on what might have been wrong here? I have not edited anything in the php.ini file regarding SMTP. Thanks. Alice Hi, Here is the revised version, and I don't think I have experienced any changes in terms of the output on the screen. Plus, I still get no email. ?php require_once(Mail.php); $mail = Mail::factory(mail); $your_name = $_POST['your_name']; $email = $_POST['email']; $question = $_POST['question']; $comments= $_POST['comments']; $submit = $_POST['submit']; $from = aj...@alumni.iu.edu; $to = elite.engl...@gmail.com; $subject = Comments; $body = From: $your_name\n E-Mail: $email\n Reason Contact: $question\n Comments:\n $comments; $headers = 'MIME-Version: 1.0' . \r\n; $headers .= 'Content-type: text/html; charset=utf-8' . \r\n; $headers .= 'Errors-to: elite.engl...@gmail.com' . \r\n; $mail -send($to, $headers, $body); if (PEAR::isError($mail)) echo p . $mail-getMessage() . /p; else { echo pMessage successfully sent!/p div id='main' h1Thank You For Contacting Us/h1 pHere is what you have input:/p ulliYour Name is b . $your_name . /b/li liYour Email is b . $email . /b/li liYou contacted us because you have a b . $question . /b/li liHere are your comments: b . $comments . /b/li/ul h1Have a Nice Day!/h1/div; } I have made sure that my $from and $to addresses are different, Could there be anything else wrong here? I have not edited anything in php.ini regarding this issue. Would I need to? Thanks for your help. Alice _ The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail. http://www.windowslive.com/campaign/thenewbusy?tile=multiaccountocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4
Re: [PHP] Mail Function Using PEAR Issues
Is there any need for this line if you are using the Errors-to: ? Maybe take it out and see what Errors-to gives you without it. On Apr 18, 2010, at 9:27 PM, Alice Wei wrote: if (PEAR::isError($mail)) echo p . $mail-getMessage() . OAN - That sendmail script I posted, I know works on Linux servers if you want to compare notes with it. Best, Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Function Using PEAR Issues
Alice Wei wrote: Date: Sun, 18 Apr 2010 21:02:29 -0500 From: k...@daleco.biz To: aj...@alumni.iu.edu CC: k...@designdrumm.com; php-general@lists.php.net Subject: Re: [PHP] Mail Function Using PEAR Issues Karl DeSaulniers wrote: Hey Alice, Again, try throwing the MIME in. $headers = 'MIME-Version: 1.0' . \r\n; $headers .= 'Content-type: text/html; charset=utf-8' . \r\n; Also: $headers .= 'Errors-to: myworkingemailaddr...@foo.com' . \r\n; Which I suggested on your previous thread. Also, I see you have $from set to equal localhost. Many SMTP servers will reject this I *think*, because localhost is a hostname, not a working mailbox. Try making $from equal to a real working address - possibly the same one as your Errors-to: header.. My $0.02, KDK On Apr 18, 2010, at 10:11 AM, Alice Wei wrote: Hi, After several days, I have rebuilt my system on Linux using Ubuntu, installed PEAR and such. Thankfully, when I execute the code, it no longer gives me the error that the class is not found. Yet, when I submit the form now, I can always see the confirmation message telling me that my message has been sent, but I cannot see it even in another mailbox. Here is the code: require_once(Mail.php); $mail = Mail::factory(mail); $your_name = $_POST['your_name']; $email = $_POST['email']; $question = $_POST['question']; $comments= $_POST['comments']; $submit = $_POST['submit']; $from = localhost; $to = $email; $subject = Comments; $body = From: $your_name\n E-Mail: $email\n Reason Contact: $question\n Comments:\n $comments; $host = localhost; $headers = array ('From' = $from,'To' = $to,'Subject' = $subject); $mail -send($to, $headers, $body); if (PEAR::isError($mail)) echo p . $mail-getMessage() . /p; else { echo pMessage successfully sent!/p div id='main' h1Thank You For Contacting Us/h1 pWe will contact you within the next b24 business hours/b./p pHere is what you have input:/p ulliYour Name is b . $your_name . /b/li liYour Email is b . $email . /b/li liYou contacted us because you have a b . $question . /b/li liHere are your comments: b . $comments . /b/li/ul h1Have a Nice Day!/h1/div; } } Can anyone on the list please give me some pointers on what might have been wrong here? I have not edited anything in the php.ini file regarding SMTP. Thanks. Alice Hi, Here is the revised version, and I don't think I have experienced any changes in terms of the output on the screen. Plus, I still get no email. ?php require_once(Mail.php); $mail = Mail::factory(mail); $your_name = $_POST['your_name']; $email = $_POST['email']; $question = $_POST['question']; $comments= $_POST['comments']; $submit = $_POST['submit']; $from = aj...@alumni.iu.edu; $to = elite.engl...@gmail.com; $subject = Comments; $body = From: $your_name\n E-Mail: $email\n Reason Contact: $question\n Comments:\n $comments; $headers = 'MIME-Version: 1.0' . \r\n; $headers .= 'Content-type: text/html; charset=utf-8' . \r\n; $headers .= 'Errors-to: elite.engl...@gmail.com' . \r\n; $mail -send($to, $headers, $body); if (PEAR::isError($mail)) echo p . $mail-getMessage() . /p; else { echo pMessage successfully sent!/p div id='main' h1Thank You For Contacting Us/h1 pHere is what you have input:/p ulliYour Name is b . $your_name . /b/li liYour Email is b . $email . /b/li liYou contacted us because you have a b . $question . /b/li liHere are your comments: b . $comments . /b/li/ul h1Have a Nice Day!/h1/div; } I have made sure that my $from and $to addresses are different, Could there be anything else wrong here? I have not edited anything in php.ini regarding this issue. Would I need to? Well, it's a Good Thing(tm) to know what those settings are. Have they changed since your last thread? KDK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail Function Problem
On Mon, 2010-04-12 at 12:25 -0400, Alice Wei wrote: Date: Mon, 12 Apr 2010 11:09:42 -0500 From: k...@daleco.biz To: aj...@alumni.iu.edu CC: a.bovane...@gmail.com; php-general@lists.php.net Subject: Re: [PHP] Mail Function Problem Alice Wei wrote: Hi! You have the following php.ini params:SMTP = smtp.live.com smtp_port = 587 live.com not support relay and it requires authentication. Is there an email account that I could try? I thought most email accounts requires authentication anyway. Well, therein lies the rub, as the Bard said (maybe). PHP's mail() was built on a general assumption that there would be a local SMTP server. It supports remote SMTP, but I'm not aware of any ability to do SMTP auth, even in the PEAR packages. You might just wanna read up on mail in general. The php.net/mail page lists several relevant RFC's, and has links to most of the PEAR mail classes, etc. You should definitely read up on live.com's email configuration. If they use SMTP auth, I'm not sure you can do this (per above). If it uses, say, POP before SMTP for authorization, you might be able to hack something together with the PHP IMAP functions, or even sockets, but you're getting into a big lotta work for what seems a small thing. This is what I am talking about. Two years ago when I first set up my own server with Linux and not Windows, I never had to deal with this. Perhaps the authentication has since then got stricter, but it should not be so much of a heck of a deal. I found this doc from ATT's website, http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf, so obviously the smtp server I provided earlier is probably not up to date. I think I will fiddle around with the php.ini file and see what else is there. Thanks. Alice _ Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1 Linux installations come with sendmail which allows you to send email directly. Windows doesn't have this as part of the base setup, but I believe if you can install a local mail server then this should fix the issue. Thanks, Ash http://www.ashleysheridan.co.uk
RE: [PHP] Mail Function Problem
Subject: RE: [PHP] Mail Function Problem From: a...@ashleysheridan.co.uk To: aj...@alumni.iu.edu CC: k...@daleco.biz; a.bovane...@gmail.com; php-general@lists.php.net Date: Tue, 13 Apr 2010 13:19:15 +0100 On Mon, 2010-04-12 at 12:25 -0400, Alice Wei wrote: Date: Mon, 12 Apr 2010 11:09:42 -0500 From: k...@daleco.biz To: aj...@alumni.iu.edu CC: a.bovane...@gmail.com; php-general@lists.php.net Subject: Re: [PHP] Mail Function Problem Alice Wei wrote: Hi! You have the following php.ini params:SMTP = smtp.live.com smtp_port = 587 live.com not support relay and it requires authentication. Is there an email account that I could try? I thought most email accounts requires authentication anyway. Well, therein lies the rub, as the Bard said (maybe). PHP's mail() was built on a general assumption that there would be a local SMTP server. It supports remote SMTP, but I'm not aware of any ability to do SMTP auth, even in the PEAR packages. You might just wanna read up on mail in general. The php.net/mail page lists several relevant RFC's, and has links to most of the PEAR mail classes, etc. You should definitely read up on live.com's email configuration. If they use SMTP auth, I'm not sure you can do this (per above). If it uses, say, POP before SMTP for authorization, you might be able to hack something together with the PHP IMAP functions, or even sockets, but you're getting into a big lotta work for what seems a small thing. This is what I am talking about. Two years ago when I first set up my own server with Linux and not Windows, I never had to deal with this. Perhaps the authentication has since then got stricter, but it should not be so much of a heck of a deal. I found this doc from ATT's website, http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf, so obviously the smtp server I provided earlier is probably not up to date. I think I will fiddle around with the php.ini file and see what else is there. Thanks. Alice _ Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1 Linux installations come with sendmail which allows you to send email directly. Windows doesn't have this as part of the base setup, but I believe if you can install a local mail server then this should fix the issue. Something like http://www.hmailserver.com/? I use ATT, why is it that I use their SMTP server and my From address in PHP.ini file didn't work? Thanks. Alice Thanks,sh http://www.ashleysheridan.co.uk _ Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1
RE: [PHP] Mail Function Problem
On Tue, 2010-04-13 at 08:59 -0400, Alice Wei wrote: Subject: RE: [PHP] Mail Function Problem From: a...@ashleysheridan.co.uk To: aj...@alumni.iu.edu CC: k...@daleco.biz; a.bovane...@gmail.com; php-general@lists.php.net Date: Tue, 13 Apr 2010 13:19:15 +0100 On Mon, 2010-04-12 at 12:25 -0400, Alice Wei wrote: Date: Mon, 12 Apr 2010 11:09:42 -0500 From: k...@daleco.biz To: aj...@alumni.iu.edu CC: a.bovane...@gmail.com; php-general@lists.php.net Subject: Re: [PHP] Mail Function Problem Alice Wei wrote: Hi! You have the following php.ini params:SMTP = smtp.live.com smtp_port = 587 live.com not support relay and it requires authentication. Is there an email account that I could try? I thought most email accounts requires authentication anyway. Well, therein lies the rub, as the Bard said (maybe). PHP's mail() was built on a general assumption that there would be a local SMTP server. It supports remote SMTP, but I'm not aware of any ability to do SMTP auth, even in the PEAR packages. You might just wanna read up on mail in general. The php.net/mail page lists several relevant RFC's, and has links to most of the PEAR mail classes, etc. You should definitely read up on live.com's email configuration. If they use SMTP auth, I'm not sure you can do this (per above). If it uses, say, POP before SMTP for authorization, you might be able to hack something together with the PHP IMAP functions, or even sockets, but you're getting into a big lotta work for what seems a small thing. This is what I am talking about. Two years ago when I first set up my own server with Linux and not Windows, I never had to deal with this. Perhaps the authentication has since then got stricter, but it should not be so much of a heck of a deal. I found this doc from ATT's website, http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf, so obviously the smtp server I provided earlier is probably not up to date. I think I will fiddle around with the php.ini file and see what else is there. Thanks. Alice _ Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1 Linux installations come with sendmail which allows you to send email directly. Windows doesn't have this as part of the base setup, but I believe if you can install a local mail server then this should fix the issue. Something like http://www.hmailserver.com/? I use ATT, why is it that I use their SMTP server and my From address in PHP.ini file didn't work? Thanks. Alice Thanks,sh http://www.ashleysheridan.co.uk _ Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1 That looks to do what you need. I don't really know of any specific other examples as it's been a while since I've used Windows for anything now. The link you gave did say it was free though, so you don't really have anything to lose by installing it. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Mail Function Problem
On 12 April 2010 05:22, Kevin Kinsey k...@daleco.biz wrote: Thanks to the worldwide brotherhood of crooks known as spammers, sending e-mail these days isn't nearly as easy as PHP makes it look. You might wanna look into an errors-to header to help debug any problems with sender authorization, bad ports, etc. Along these lines: there's a chance that sending a mail from yourself, to yourself, through PHP like this, will cause mail servers to think it's spam. For testing email sending, normal scenarios are better (i.e. send an email to another account). Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail Function Problem
From: peter.e.l...@gmail.com Date: Mon, 12 Apr 2010 13:09:48 +0200 Subject: Re: [PHP] Mail Function Problem To: k...@daleco.biz CC: aj...@alumni.iu.edu; php-general@lists.php.net On 12 April 2010 05:22, Kevin Kinsey k...@daleco.biz wrote: Thanks to the worldwide brotherhood of crooks known as spammers, sending e-mail these days isn't nearly as easy as PHP makes it look. You might wanna look into an errors-to header to help debug any problems with sender authorization, bad ports, etc. Along these lines: there's a chance that sending a mail from yourself, to yourself, through PHP like this, will cause mail servers to think it's spam. For testing email sending, normal scenarios are better (i.e. send an email to another account). Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 /hype I have changed my $to to $email, so it is not the same email address as the $from. I also added Kevin's lines with the parameters that April suggested, and it looks like I still get Sending Mail failed. Which function should I use to find out why my sending mail failed? Thanks for your help. Alice _ The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. http://www.windowslive.com/campaign/thenewbusy?tile=multicalendarocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5
Re: [PHP] Mail Function Problem
Hi! You have the following php.ini params: SMTP = smtp.live.com smtp_port = 587 live.com not support relay and it requires authentication. On Mon, Apr 12, 2010 at 6:33 AM, Alice Wei aj...@alumni.iu.edu wrote: Hi, I have an issue here where I see no PHP errors on my mail function usage, and yet I am not getting the mail in the desired account. Here is what I have for my PHP code: $headers = From: aj...@alumni.iu.edu; $to = aj...@alumni.iu.edu ; $subject = Comments Regarding My Studio; $body = From: $your_name\n E-Mail: $email\n Reason Contact: $question\n Comments:\n $comments; mail($to, $subject, $body,$headers); This is what I have in my PHP.ini: [mail function] ; For Win32 only. SMTP = smtp.live.com smtp_port = 587 ; For Win32 only. sendmail_from = aj...@alumni.iu.edu ; For Unix only. You may supply arguments as well (default: sendmail -t -i). ;sendmail_path = ; Force the addition of the specified parameters to be passed as extra parameters ; to the sendmail binary. These parameters will always replace the value of ; the 5th parameter to mail(), even in safe mode. ;mail.force_extra_parameters = Yet, I don't see any mail in my aj...@alumni.iu.edu Mailbox, can anyone on the list please give me some pointers on what I may have done wrong here? Thanks for your help. _ The New Busy is not the old busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3 -- With regards, Alexei Bovanenko
RE: [PHP] Mail Function Problem
Date: Mon, 12 Apr 2010 15:26:46 +0400 Subject: Re: [PHP] Mail Function Problem From: a.bovane...@gmail.com To: aj...@alumni.iu.edu CC: php-general@lists.php.net Hi! You have the following php.ini params:SMTP = smtp.live.com smtp_port = 587 live.com not support relay and it requires authentication. Is there an email account that I could try? I thought most email accounts requires authentication anyway. Thanks for your help. Alice On Mon, Apr 12, 2010 at 6:33 AM, Alice Wei aj...@alumni.iu.edu wrote: Hi, I have an issue here where I see no PHP errors on my mail function usage, and yet I am not getting the mail in the desired account. Here is what I have for my PHP code: $headers = From: aj...@alumni.iu.edu; $to = aj...@alumni.iu.edu ; $subject = Comments Regarding My Studio; $body = From: $your_name\n E-Mail: $email\n Reason Contact: $question\n Comments:\n $comments; mail($to, $subject, $body,$headers); This is what I have in my PHP.ini: [mail function] ; For Win32 only. SMTP = smtp.live.com smtp_port = 587 ; For Win32 only. sendmail_from = aj...@alumni.iu.edu ; For Unix only. You may supply arguments as well (default: sendmail -t -i). ;sendmail_path = ; Force the addition of the specified parameters to be passed as extra parameters ; to the sendmail binary. These parameters will always replace the value of ; the 5th parameter to mail(), even in safe mode. ;mail.force_extra_parameters = Yet, I don't see any mail in my aj...@alumni.iu.edu Mailbox, can anyone on the list please give me some pointers on what I may have done wrong here? Thanks for your help. _ The New Busy is not the old busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3 -- With regards, Alexei Bovanenko _ The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. http://www.windowslive.com/campaign/thenewbusy?tile=multicalendarocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5
Re: [PHP] Mail Function Problem
Alice Wei wrote: Hi! You have the following php.ini params:SMTP = smtp.live.com smtp_port = 587 live.com not support relay and it requires authentication. Is there an email account that I could try? I thought most email accounts requires authentication anyway. Well, therein lies the rub, as the Bard said (maybe). PHP's mail() was built on a general assumption that there would be a local SMTP server. It supports remote SMTP, but I'm not aware of any ability to do SMTP auth, even in the PEAR packages. You might just wanna read up on mail in general. The php.net/mail page lists several relevant RFC's, and has links to most of the PEAR mail classes, etc. You should definitely read up on live.com's email configuration. If they use SMTP auth, I'm not sure you can do this (per above). If it uses, say, POP before SMTP for authorization, you might be able to hack something together with the PHP IMAP functions, or even sockets, but you're getting into a big lotta work for what seems a small thing. Kevin Kinsey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail Function Problem
Date: Mon, 12 Apr 2010 11:09:42 -0500 From: k...@daleco.biz To: aj...@alumni.iu.edu CC: a.bovane...@gmail.com; php-general@lists.php.net Subject: Re: [PHP] Mail Function Problem Alice Wei wrote: Hi! You have the following php.ini params:SMTP = smtp.live.com smtp_port = 587 live.com not support relay and it requires authentication. Is there an email account that I could try? I thought most email accounts requires authentication anyway. Well, therein lies the rub, as the Bard said (maybe). PHP's mail() was built on a general assumption that there would be a local SMTP server. It supports remote SMTP, but I'm not aware of any ability to do SMTP auth, even in the PEAR packages. You might just wanna read up on mail in general. The php.net/mail page lists several relevant RFC's, and has links to most of the PEAR mail classes, etc. You should definitely read up on live.com's email configuration. If they use SMTP auth, I'm not sure you can do this (per above). If it uses, say, POP before SMTP for authorization, you might be able to hack something together with the PHP IMAP functions, or even sockets, but you're getting into a big lotta work for what seems a small thing. This is what I am talking about. Two years ago when I first set up my own server with Linux and not Windows, I never had to deal with this. Perhaps the authentication has since then got stricter, but it should not be so much of a heck of a deal. I found this doc from ATT's website, http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf, so obviously the smtp server I provided earlier is probably not up to date. I think I will fiddle around with the php.ini file and see what else is there. Thanks. Alice _ Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1
RE: [PHP] Mail Function Problem
On Mon, 2010-04-12 at 12:58 -0400, Alice Wei wrote: Hi, I found an article on the item you described. http://www.talkphp.com/vbarticles.php?do=articlearticleid=51title=sending-emails-with-the-zend-framework, but I am using Windows on my PHP. Would this still work? Looks like the example code it provided is from a Linux system. I also saw info. on this link: http://activecodeline.com/sending-emails-via-zend_mail-using-google-email-account. Since all the authentication is done here in one go, what should I edit on my PHP.ini file? Do I have to set the params as http://helpme.att.net/pdf/uverse/uverse_hsi_qsg_english.pdf is described? I use U-Verse from ATT, by by way. [mail function] ; For Win32 only. SMTP = smtp.att,yahoo.com smtp_port = 465 ; For Win32 only. sendmail_from = elite.engl...@att.net There's no need to edit anything in php.ini, and, since it is pure PHP, it should work on Windows too, though I didn't try it. It works well on Linux. Here's the class we used to send mail through Zend_Mail: ?php class Mail_Send { public function __construct($to_mail, $to_name, $subject, $body) { $config_general = Database_Config_General::getInstance (); $mail = new Zend_Mail(); $mail-setFrom($config_general-getSiteMailAddress(), $config_general-getSiteMailName()); $mail-addTo($to_mail, $to_name); $mail-setSubject($subject); $mail-setBodyText($body, UTF-8); $smtp_host = $config_general-getMailSendHost(); $smtp_authentication = $config_general-getMailSendAuthentication (); $smtp_user = $config_general-getMailSendUsername(); $smtp_password = $config_general-getMailSendPassword(); $smtp_security = $config_general-getMailSendSecurity(); $smtp_port = $config_general-getMailSendPort(); if ($smtp_host != ) { if ($smtp_authentication != None) { $config = array ('auth' = $smtp_authentication, 'username' = $smtp_user, 'password' = $smtp_password); $mta = new Zend_Mail_Transport_Smtp($smtp_host); } if ($smtp_security != NONE) { $config = array_merge ($config, array ('ssl' = $smtp_security)); } if ($smtp_port != ) { $config = array_merge ($config, array ('port' = $smtp_port)); } if (isset ($config)) { $mta = new Zend_Mail_Transport_Smtp($smtp_host, $config); } else { $mta = new Zend_Mail_Transport_Smtp($smtp_host); } $mail-send($mta); } else { // If no smtp host is given, it uses the default sendmail mail transport agent. $mail-send(); } } } ? Hope it works, Teus. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Function Problem
PEAR's mail package does support authentication. http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm In case you get a Sent Successfully message (but didn't get a mail in your inbox or spam folder) there is a problem with your SMTP server configuration. And There's no need to edit anything in php.ini, and, since it is pure PHP, it should work on Windows too (i tried it and it works) KK. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Function Problem
kranthi wrote: PEAR's mail package does support authentication. http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm I will say mea culpa on this one; apparently I didn't dig deep enough into the PEAR docs to figure this out. It's certainly not mentioned on the manpage at php.net, but, of course, the PEAR stuff is elsewhere. I read over the first page linked from the PHP manpage, so it must have been a lil' deeper than that. If it's only available at about.com (lol), I'd suggest filing a PR with the PEAR folk's documentation team, eh? But, this time I'll do what I shoulda mentioned before and include the IANAE disclaimer on all things PEAR, many things PHP, and some things SMTP. Kevin Kinsey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail Function Problem
Hi, Thanks to everyone's suggestions, I have followed some instructions from http://www.geeksengine.com/article/install-pear-on-windows.html and attempted to install PEAR. The problem is, when I do a test page, which only has: ?php error_reporting(-1); require_once PEAR.php; ?. utor It only gives me a blank page, with no errors. Has anyone who succeeded with using PEAR on PHP can guide me on a good tutorial to read? Thanks for your help. Alice Date: Mon, 12 Apr 2010 15:54:05 -0500 From: k...@daleco.biz To: kranthi...@gmail.com CC: aj...@alumni.iu.edu; php-general@lists.php.net Subject: Re: [PHP] Mail Function Problem kranthi wrote: PEAR's mail package does support authentication. http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm I will say mea culpa on this one; apparently I didn't dig deep enough into the PEAR docs to figure this out. It's certainly not mentioned on the manpage at php.net, but, of course, the PEAR stuff is elsewhere. I read over the first page linked from the PHP manpage, so it must nks ve been a lil' deeper than that. If it's only available at about.com (lol), I'd suggest filing a PR with the PEAR folk's documentation team, eh? But, this time I'll do what I shoulda mentioned before and include the IANAE disclaimer on all things PEAR, many things PHP, and some things SMTP. Kevin Kinsey _ The New Busy is not the old busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3
Re: [PHP] Mail Function Problem
Hi Alice, I have a sendmail script I wrote on my way to learning PHP. Uses PHP 4 i believe, maybe 5. Wrote it a while ago. You and anyone else are welcome to use it/modify. You can reference this php it from multiple forms. Just specify the form names it should accept and their parameters. It can also send HTML results with a little modification. It isn't necessarily set up for mass emailing, but with a little tweaking, I am sure you could get it to work. You can separate the emails with comas , currently and it will send to all of them, but if they are in the TO:, everyone will see everyones email address. Might set it up to send to your email in the TO: and use the BCC: to send to your users. If you do convert it, mind sharing back?? :)) HTH, http://designdrumm.com/sendmail_gen.php.zip Karl On Apr 12, 2010, at 5:31 PM, Alice Wei wrote: Hi, Thanks to everyone's suggestions, I have followed some instructions from http://www.geeksengine.com/article/install-pear-on-windows.html and attempted to install PEAR. The problem is, when I do a test page, which only has: ?php error_reporting(-1); require_once PEAR.php; ?. utor It only gives me a blank page, with no errors. Has anyone who succeeded with using PEAR on PHP can guide me on a good tutorial to read? Thanks for your help. Alice Date: Mon, 12 Apr 2010 15:54:05 -0500 From: k...@daleco.biz To: kranthi...@gmail.com CC: aj...@alumni.iu.edu; php-general@lists.php.net Subject: Re: [PHP] Mail Function Problem kranthi wrote: PEAR's mail package does support authentication. http://email.about.com/od/emailprogrammingtips/qt/ PHP_Email_SMTP_Authentication.htm I will say mea culpa on this one; apparently I didn't dig deep enough into the PEAR docs to figure this out. It's certainly not mentioned on the manpage at php.net, but, of course, the PEAR stuff is elsewhere. I read over the first page linked from the PHP manpage, so it must nks ve been a lil' deeper than that. If it's only available at about.com (lol), I'd suggest filing a PR with the PEAR folk's documentation team, eh? But, this time I'll do what I shoulda mentioned before and include the IANAE disclaimer on all things PEAR, many things PHP, and some things SMTP. Kevin Kinsey _ The New Busy is not the old busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy? ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3 Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail Function Problem
Date: Mon, 12 Apr 2010 15:54:05 -0500 From: k...@daleco.biz To: kranthi...@gmail.com CC: aj...@alumni.iu.edu; php-general@lists.php.net Subject: Re: [PHP] Mail Function Problem kranthi wrote: PEAR's mail package does support authentication. http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm I will say mea culpa on this one; apparently I didn't dig deep enough into the PEAR docs to figure this out. It's certainly not mentioned on the manpage at php.net, but, of course, the PEAR stuff is elsewhere. I read over the first page linked from the PHP manpage, so it must have been a lil' deeper than that. If it's only available at about.com (lol), I'd suggest filing a PR with the PEAR folk's documentation team, eh? But, this time I'll do what I shoulda mentioned before and include the IANAE disclaimer on all things PEAR, many things PHP, and some things SMTP. Kevin Kinsey I tried installing the Pear Mail package, it is now located in php/PEAR/Mail, and my code is located in the htdocs. Here is the code: require_once(Mail.php); $mail = Mail::factory(mail); $your_name = $_POST['your_name']; $email = $_POST['email']; $question = $_POST['question']; $comments= $_POST['comments']; $submit = $_POST['submit']; if($_POST['submit']==Submit) { $from = elite.engl...@att.net; $to = $email; $subject = Comments Regarding HH Web Design Studio; $body = From: $your_name\n E-Mail: $email\n Reason Contact: $question\n Comments:\n $comments; $host = smtp.att.yahoo.com; $username = my_user_name; $password = password; $headers = array ('From' = $from, 'To' = $to, 'Subject' = $subject); $mail-send($to, $headers, $body); if (PEAR::isError($mail)) echo p . $mail-getMessage() . /p; This is what I get: Fatal error: Class 'Mail' not found in C:\xampp\htdocs\Alice.Wei\web\mail.php on line 30 Do I need to move the Mail PEAR class to the same folder as my web folder? How can I make sure that my Pear is running? Thanks for your help. Alice _ The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail. http://www.windowslive.com/campaign/thenewbusy?tile=multiaccountocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4
Re: [PHP] Mail Function Problem
thats weired... Mail.php contains the class Mail. So getting a class not found error is not possible... (require_once stops the script in case it can't find Mail.php) Do I need to move the Mail PEAR class to the same folder as my web folder ensure that C:/xampp/php/PEAR folder is added to your include list -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail Function Problem
From: kranthi...@gmail.com Date: Tue, 13 Apr 2010 07:41:19 +0530 Subject: Re: [PHP] Mail Function Problem To: aj...@alumni.iu.edu CC: k...@daleco.biz; php-general@lists.php.net thats weired... Mail.php contains the class Mail. So getting a class not found error is not possible... (require_once stops the script in case it can't find Mail.php) Do I need to move the Mail PEAR class to the same folder as my web folder ensure that C:/xampp/php/PEAR folder is added to your include list I thought so too, this is what I have in my php.ini: ; PHP's default setting for include_path is .;/path/to/php/pear ; http://php.net/include-path include_path = .;C:\xampp\php\PEAR This is the contents of my C:\xampp\php\PEAR\Mail: mail.php mime.php mimeDecode.php mimePart.php null.php RFC822.php sendmail.php smtp.php Unless, I have to do require_once(mail.php)? I am getting confused. Alice _ Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2
Re: [PHP] Mail Function Problem
Hey Alice, Try throwing the MIME in. Sometimes messages get thrown in an abyss if they don't know the MIME version or content type of an email. They think its spam and so you wouldn't get an error message on your end. Just no email. $headers = 'MIME-Version: 1.0' . \r\n; $headers .= 'Content-type: text/html; charset=utf-8' . \r\n; Karl On Apr 12, 2010, at 10:24 PM, Alice Wei wrote: From: kranthi...@gmail.com Date: Tue, 13 Apr 2010 07:41:19 +0530 Subject: Re: [PHP] Mail Function Problem To: aj...@alumni.iu.edu CC: k...@daleco.biz; php-general@lists.php.net thats weired... Mail.php contains the class Mail. So getting a class not found error is not possible... (require_once stops the script in case it can't find Mail.php) Do I need to move the Mail PEAR class to the same folder as my web folder ensure that C:/xampp/php/PEAR folder is added to your include list I thought so too, this is what I have in my php.ini: ; PHP's default setting for include_path is .;/path/to/php/pear ; http://php.net/include-path include_path = .;C:\xampp\php\PEAR This is the contents of my C:\xampp\php\PEAR\Mail: mail.php mime.php mimeDecode.php mimePart.php null.php RFC822.php sendmail.php smtp.php Unless, I have to do require_once(mail.php)? I am getting confused. Alice _ Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. http://www.windowslive.com/campaign/thenewbusy? ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2 Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Function Problem
when you install pear package Mail a file called Mail.php will be installed into C:/xampp/php/PEAR Mail.php contains the class Mail. So getting a class not found error is not possible.. are you sure you are doing require_once 'Mail.php' ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Function Problem
Alice Wei wrote: Hi, I have an issue here where I see no PHP errors on my mail function usage, and yet I am not getting the mail in the desired account. Here is what I have for my PHP code: $headers = From: aj...@alumni.iu.edu; $to = aj...@alumni.iu.edu ; $subject = Comments Regarding My Studio; $body = From: $your_name\n E-Mail: $email\n Reason Contact: $question\n Comments:\n $comments; mail($to, $subject, $body,$headers); I don't see any way for you to know if there are any errors. Try this as a very basic start: $headers = From: aj...@alumni.iu.edu; $to = aj...@alumni.iu.edu ; $subject = Comments Regarding My Studio; $body = From: $your_name\n E-Mail: $email\n Reason Contact: $question\n Comments:\n $comments; $success=mail($to, $subject, $body,$headers); if ($success) { echo Mail was sent successfully!; } else { echo Sending of mail failed!; } This is what I have in my PHP.ini: [mail function] ; For Win32 only. SMTP = smtp.live.com smtp_port = 587 ; For Win32 only. sendmail_from = aj...@alumni.iu.edu ; For Unix only. You may supply arguments as well (default: sendmail -t -i). ;sendmail_path = ; Force the addition of the specified parameters to be passed as extra parameters ; to the sendmail binary. These parameters will always replace the value of ; the 5th parameter to mail(), even in safe mode. ;mail.force_extra_parameters = Yet, I don't see any mail in my aj...@alumni.iu.edu Mailbox, can anyone on the list please give me some pointers on what I may have done wrong here? Thanks for your help. Thanks to the worldwide brotherhood of crooks known as spammers, sending e-mail these days isn't nearly as easy as PHP makes it look. You might wanna look into an errors-to header to help debug any problems with sender authorization, bad ports, etc. HTH, KDK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Function In PHP
Having worked at a decent sized, respectable ISP with 100,000+ customers sending email via Iron Ports (email scanners), even they would get put on a blacklist on a monthly basis. Hell it wouldn't surprise me if Gmail's SMTP servers got put on a black list at some point. There's seemingly hundreds of blacklists and whilst some play nice, others are very paranoid. Usually the good email servers will detect your on a blacklist then rate limit the number of emails it'll accept from you. If you keep pissing it off, by sending emails to non-existant addresses (something they REALLY hate), sending emails that are too big, or simply sending too many emails or emails with too many recipients, then it'll tighten the restrictions. Over time if your good then those restrictions will be released and eventually you'll be able to send at normal rates. -- Michael Kubler I believe in a better world. I support the Zeitgeist Movement -- www.zeitgeistaustralia.org Teus Benschop wrote: Once a domain or ip address was black listed, it was quite a process to get it unlisted again, and even then as soon as mail came from that domain, it got blacklisted again. Supposedly there is some certification process that official smtp relays need to go through so as to prove or certify that they won't allow spam to be sent through them, and take steps to remove offenders from using their relay. However, this is all guessing, and in the end we just gave up and used our ISP's official relay. Teus. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Function In PHP
On 7 March 2010 04:54, Kannan kanna...@gmail.com wrote: Hello I am creating a application for our college using the php.In that i want to send mail to all who are all the list. For that i am just simply use the mail function in php without configuring any mail system in the system.But the mail didn't send. For sending the mails wat are requirements and if u have any tutorials send it to me? Thanks.. -- With regards, Kannan. R. P, Blog @: http://kannan4k.wordpress.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Contrary to popular belief, to send an email you do not need to have your own SMTP server. All you need to know is the SMTP server responsible for your recipients email. This information is held as part of the domain registration details and is known as the MX records (as I understand it). PHP has a function called getmxrr() [1]. This allows you to supply a domain name and get back the list of MX records suitable for handling the SMTP mail. This function wasn't available on Windows until recently, and I created a userland version utilising Windows nslookup.exe program [2]. So, once you've got the list of SMTP servers for the domain you are sending email to, you can use the ini_set('SMTP', 'xx'); function to set the server to handle the mail() call you are about to make. Upside : No local SMTP server - you are not responsible for maintaining/administering/etc. any aspect of the SMTP process. Upside : If the mail() call fails, you can try the other MX records (I tend to sort the results based upon weight and try them in sequence). If it fails all of them, you know straight away and can deal with it. Upside : No relaying. No permission issues to worry about. You are simply talking to the public SMTP servers just like any other SMTP server or sender. Downside : No queuing. Without a _LOCAL_ SMTP server, you can only deal with sending email in real time. Downside : One domain at a time. You cannot send email to a...@domain1.com, b...@domain2.com _AND_ c...@domain3.com in the 1 email. None of these steps affect the use of mail() or a mail sending class (phpmailer, RMail, html_mime_mail5, etc.). Regards, Richard. [1] http://docs.php.net/getmxrr [2] http://docs.php.net/getmxrr#53182 Richard. -- - Richard Quadling Standing on the shoulders of some very clever giants! EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Function In PHP
On Mon, 2010-03-08 at 10:21 +, Richard Quadling wrote: Contrary to popular belief, to send an email you do not need to have your own SMTP server. All you need to know is the SMTP server responsible for your recipients email. [...] While the above is true, there is also another thing that comes into play. We used to send email directly to the receiver the way described above. But at times it happens that the receiving smtp server refuses to accept mail from the sender since the sender is not known to be a good smtp server, and at times it could get blacklisted. Rules like this get tightened up because of the desire to curb spam at the source. Teus. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Function In PHP
On 8 March 2010 13:06, Teus Benschop teusjanne...@gmail.com wrote: On Mon, 2010-03-08 at 10:21 +, Richard Quadling wrote: Contrary to popular belief, to send an email you do not need to have your own SMTP server. All you need to know is the SMTP server responsible for your recipients email. [...] While the above is true, there is also another thing that comes into play. We used to send email directly to the receiver the way described above. But at times it happens that the receiving smtp server refuses to accept mail from the sender since the sender is not known to be a good smtp server, and at times it could get blacklisted. Rules like this get tightened up because of the desire to curb spam at the source. Teus. Black listing can happen even for valid domains. -- - Richard Quadling Standing on the shoulders of some very clever giants! EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Function In PHP
On 8 March 2010 13:06, Teus Benschop teusjanne...@gmail.com wrote: On Mon, 2010-03-08 at 10:21 +, Richard Quadling wrote: Contrary to popular belief, to send an email you do not need to have your own SMTP server. All you need to know is the SMTP server responsible for your recipients email. [...] While the above is true, there is also another thing that comes into play. We used to send email directly to the receiver the way described above. But at times it happens that the receiving smtp server refuses to accept mail from the sender since the sender is not known to be a good smtp server, and at times it could get blacklisted. Rules like this get tightened up because of the desire to curb spam at the source. Teus. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php So, say I did go and setup a local SMTP relay, how would I make it known that it was a real smtp server and not just some script pushing spam? -- - Richard Quadling Standing on the shoulders of some very clever giants! EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Function In PHP
On Mon, 2010-03-08 at 17:18 +, Richard Quadling wrote: On 8 March 2010 13:06, Teus Benschop teusjanne...@gmail.com wrote: On Mon, 2010-03-08 at 10:21 +, Richard Quadling wrote: Contrary to popular belief, to send an email you do not need to have your own SMTP server. All you need to know is the SMTP server responsible for your recipients email. [...] While the above is true, there is also another thing that comes into play. We used to send email directly to the receiver the way described above. But at times it happens that the receiving smtp server refuses to accept mail from the sender since the sender is not known to be a good smtp server, and at times it could get blacklisted. Rules like this get tightened up because of the desire to curb spam at the source. Teus. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php So, say I did go and setup a local SMTP relay, how would I make it known that it was a real smtp server and not just some script pushing spam? -- - Richard Quadling Standing on the shoulders of some very clever giants! EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling By having your local relay talk seductively to the remote server? More sensibly though, I would assume that you could use some sort of certificate for this, although I don't know much about mail servers. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Mail Function In PHP
If you control your DNS server setup and such, DKIM and authentication technologies alikes (http://en.wikipedia.org/wiki/DomainKeys) are the way to go. Also, make sure the reverse DNS lookup is pointing to the right place, i.e. that the SMTP server domain name translates to an IP that translates back to the same domain name when you do a reverse lookup. Since this is really something more of a network arch. setup, you probably will find more answers for that on ServerFault or the likes. MT On Tue, Mar 9, 2010 at 2:18 AM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Mon, 2010-03-08 at 17:18 +, Richard Quadling wrote: On 8 March 2010 13:06, Teus Benschop teusjanne...@gmail.com wrote: On Mon, 2010-03-08 at 10:21 +, Richard Quadling wrote: Contrary to popular belief, to send an email you do not need to have your own SMTP server. All you need to know is the SMTP server responsible for your recipients email. [...] While the above is true, there is also another thing that comes into play. We used to send email directly to the receiver the way described above. But at times it happens that the receiving smtp server refuses to accept mail from the sender since the sender is not known to be a good smtp server, and at times it could get blacklisted. Rules like this get tightened up because of the desire to curb spam at the source. Teus. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php So, say I did go and setup a local SMTP relay, how would I make it known that it was a real smtp server and not just some script pushing spam? -- - Richard Quadling Standing on the shoulders of some very clever giants! EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling By having your local relay talk seductively to the remote server? More sensibly though, I would assume that you could use some sort of certificate for this, although I don't know much about mail servers. Thanks, Ash http://www.ashleysheridan.co.uk -- Marc Trudel-Bélisle www.wizcorp.jp
Re: [PHP] Mail Function In PHP
On Mon, 2010-03-08 at 17:18 +, Richard Quadling wrote: So, say I did go and setup a local SMTP relay, how would I make it known that it was a real smtp server and not just some script pushing spam? Once a domain or ip address was black listed, it was quite a process to get it unlisted again, and even then as soon as mail came from that domain, it got blacklisted again. Supposedly there is some certification process that official smtp relays need to go through so as to prove or certify that they won't allow spam to be sent through them, and take steps to remove offenders from using their relay. However, this is all guessing, and in the end we just gave up and used our ISP's official relay. Teus. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Function In PHP
On 03/08/2010 06:18 PM, Richard Quadling wrote: On 8 March 2010 13:06, Teus Benschopteusjanne...@gmail.com wrote: On Mon, 2010-03-08 at 10:21 +, Richard Quadling wrote: Contrary to popular belief, to send an email you do not need to have your own SMTP server. All you need to know is the SMTP server responsible for your recipients email. [...] above. But at times it happens that the receiving smtp server refuses to accept mail from the sender since the sender is not known to be a good smtp server, and at times it could get blacklisted. Rules like this get tightened up because of the desire to curb spam at the source. Teus. So, say I did go and setup a local SMTP relay, how would I make it known that it was a real smtp server and not just some script pushing spam? You can use SPF, DomainKeys plus valid DNS information. I have setup SPF records for my domains. If you attempt to send E-Mail as if it was sent from my server then any server doing SPF record checking will not accept or simply drop your message. I have not setup DomainKeys since SPF has served me well but I will configure it soon. -- John Insanity in individuals is something rare - but in groups, parties, nations and epochs, it is the rule. [Friedrich Nietzsche] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Function In PHP
On 03/08/2010 10:45 PM, John Black wrote: You can use SPF, DomainKeys plus valid DNS information. I have setup SPF records for my domains. If you attempt to send E-Mail as if it was sent from my server then any server doing SPF record checking will not accept or simply drop your message. I have not setup DomainKeys since SPF has served me well but I will configure it soon. woops, forgot to add that I doubt that you'll be able to get a pure webserver to do this for you, reliably, since some smtp servers will call your server back and check if the e-mail account exists. I'd assume that the server will drop the mail if your script sending server is not even running smtp on port 25. -- John Niemand ist frei, der über sich selbst nicht Herr ist. [Matthias Claudius] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Function In PHP
Any volume of mail sent direct to mx records is a red flag for anti spammers and without an smtp spf dkim and rdns you are wasting your time. The logic is that only people sending spam would be sending direct to mx like that. Fair or not that is just how life works. Oh and most mail servers do check rdns spf etc. It is kind of pointless to send emails if they end up in the spam folder or worse don't get delivered at all. Do it right the first time use an smtp rdns and spf at the very least. Sent via BlackBerry from T-Mobile -Original Message- From: Richard Quadling rquadl...@googlemail.com Date: Mon, 8 Mar 2010 10:21:53 To: Kannankanna...@gmail.com Cc: php-general@lists.php.net Subject: Re: [PHP] Mail Function In PHP On 7 March 2010 04:54, Kannan kanna...@gmail.com wrote: Hello I am creating a application for our college using the php.In that i want to send mail to all who are all the list. For that i am just simply use the mail function in php without configuring any mail system in the system.But the mail didn't send. For sending the mails wat are requirements and if u have any tutorials send it to me? Thanks.. -- With regards, Kannan. R. P, Blog @: http://kannan4k.wordpress.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Contrary to popular belief, to send an email you do not need to have your own SMTP server. All you need to know is the SMTP server responsible for your recipients email. This information is held as part of the domain registration details and is known as the MX records (as I understand it). PHP has a function called getmxrr() [1]. This allows you to supply a domain name and get back the list of MX records suitable for handling the SMTP mail. This function wasn't available on Windows until recently, and I created a userland version utilising Windows nslookup.exe program [2]. So, once you've got the list of SMTP servers for the domain you are sending email to, you can use the ini_set('SMTP', 'xx'); function to set the server to handle the mail() call you are about to make. Upside : No local SMTP server - you are not responsible for maintaining/administering/etc. any aspect of the SMTP process. Upside : If the mail() call fails, you can try the other MX records (I tend to sort the results based upon weight and try them in sequence). If it fails all of them, you know straight away and can deal with it. Upside : No relaying. No permission issues to worry about. You are simply talking to the public SMTP servers just like any other SMTP server or sender. Downside : No queuing. Without a_LOCAL_ SMTP server, you can only deal with sending email in real time. Downside : One domain at a time. You cannot send email to a...@domain1.com, b...@domain2.com_and_ c...@domain3.com in the 1 email. None of these steps affect the use of mail() or a mail sending class (phpmailer, RMail, html_mime_mail5, etc.). Regards, Richard. [1] http://docs.php.net/getmxrr [2] http://docs.php.net/getmxrr#53182 Richard. -- - Richard Quadling Standing on the shoulders of some very clever giants! EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Function In PHP
You need SMTP Server for this.. Read bellow link to know more how to configure SMTP Server in PHP http://email.about.com/od/emailprogrammingtips/qt/Configure_PHP_to_Use_a_Remote_SMTP_Server_for_Sending_Mail.htm http://email.about.com/od/emailprogrammingtips/qt/Configure_PHP_to_Use_a_Remote_SMTP_Server_for_Sending_Mail.htm On Sun, Mar 7, 2010 at 10:24 AM, Kannan kanna...@gmail.com wrote: Hello I am creating a application for our college using the php.In that i want to send mail to all who are all the list. For that i am just simply use the mail function in php without configuring any mail system in the system.But the mail didn't send. For sending the mails wat are requirements and if u have any tutorials send it to me? Thanks.. -- With regards, Kannan. R. P, Blog @: http://kannan4k.wordpress.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Devendra Jadhav देवेंद्र जाधव
Re: [PHP] Mail Function In PHP
Kannan wrote: Hello I am creating a application for our college using the php.In that i want to send mail to all who are all the list. For that i am just simply use the mail function in php without configuring any mail system in the system.But the mail didn't send. For sending the mails wat are requirements and if u have any tutorials send it to me? Thanks.. Hello, Read the manual page for the mail() function ... http://www.php.net/mail Mail() requires an operating SMTP server. This can be set in php.ini, and possibly via the ini_set() function. These might be worth looking into: $config1=ini_set(sendmail_path,/usr/sbin/sendmail -t -i); $config2=ini_set(SMTP,localhost); $config3=ini_set(smtp_port,25); If you absolutely can't run an SMTP server or use a remote server, you'd probably have to hack something together with sockets or streams. My $0.02, Kevin Kinsey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail mimedecode with multiple mails in one mbox file
Ashley Sheridan wrote: On Sun, 2009-11-15 at 20:54 +0100, Per Jessen wrote: Ashley Sheridan wrote: Hi all, I'm having a bit of difficulty seeing my way through this. I think I'm on the right path with mimeDecode, but I can't get it to read all of the emails in an mbox file which contains 100 emails; it only reads the first. I've looked over the docs on pear.php.net, but can't seem to find any way to get the other 99 emails out! Does anyone know of any way to do this, Look up formail -s /Per -- Per Jessen, Zürich (9.0°C) Thanks, that's got me going in the right direction! There just seems to be no end to what you can do on a Linux console does there?! Suggestions to the contrary would be heresy. :-[ formail has helped me a number of times when dealing with a mailbox file, I'm pretty certain it'll do what you want. /Per -- Per Jessen, Zürich (10.1°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail mimedecode with multiple mails in one mbox file
Ashley Sheridan wrote: Hi all, I'm having a bit of difficulty seeing my way through this. I think I'm on the right path with mimeDecode, but I can't get it to read all of the emails in an mbox file which contains 100 emails; it only reads the first. I've looked over the docs on pear.php.net, but can't seem to find any way to get the other 99 emails out! Does anyone know of any way to do this, Look up formail -s /Per -- Per Jessen, Zürich (9.0°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail mimedecode with multiple mails in one mbox file
On Sun, 2009-11-15 at 20:54 +0100, Per Jessen wrote: Ashley Sheridan wrote: Hi all, I'm having a bit of difficulty seeing my way through this. I think I'm on the right path with mimeDecode, but I can't get it to read all of the emails in an mbox file which contains 100 emails; it only reads the first. I've looked over the docs on pear.php.net, but can't seem to find any way to get the other 99 emails out! Does anyone know of any way to do this, Look up formail -s /Per -- Per Jessen, Zürich (9.0°C) Thanks, that's got me going in the right direction! There just seems to be no end to what you can do on a Linux console does there?! Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Mail Command Body Issue - Trying to use 'do while' loop
On Sep 12, 2009, at 3:47 PM, c...@hosting4days.com wrote: I'm having a problem with mail body issue trying to use 'do while' loop in the $mail_body var. this line: do { echo $row_get1['name'] } while ($row_get1 = mysql_fetch_assoc ($get1)) will show ok when it's on the page elsewhere (not in the $mail_body var) but typed like: --- ok on web page (not email) ?php do { echo $row_get1['vt_name']; } while ($row_get1 = mysql_fetch_assoc ($get1)); ? Q: i want TEXT LOOP TEXT - AM I MISSING some syntax characters like(; or??) somewhere or THANKS for your help - dave I got it working like this ?php $loop1 = ''; do { $loop1 = $loop1.\n.$row_get1['vt_name'].' - '; } while ($row_get1 = mysql_fetch_assoc($get1)); $mail_body = test \n\n.test2 .$loop1.Thanks test xxx; ? Q: is this the best way? - full email code ?php $mail_body = test \n\n.test2.do { echo 'test' } while ($row_get1 = mysql_fetch_assoc($get1)).Thanks test xxx; ? ?php $Name = test; //senders name $email = t...@test.com; //senders e-mail adress $recipientname = t...@test.com; $recipient = t...@test.com; //recipient $subject = test. $header = From: . $Name . . $email . \r\n; //optional headerfields $fullto = $recipientname . . $recipient . ; //$fullto = $recipientname . . $recipient . ., .$recip2; ini_set('sendmail_from', 't...@test.com'); mail($fullto, $subject, $mail_body, $header); //mail command :) ? Thanks, c...@hosting4days.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Thanks, c...@hosting4days.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail attachment
On Sat, Sep 05, 2009 at 06:52:53PM +0200, Grega Leskov??ek wrote: How do I attach a file in mail function or do I have to use PEAR (and if how ...). What are the advantages of PEAR? When do You suggest to use PEAR? You *can* attach something to an email using the mail() function, but the process is complicated, and the mail() function isn't really set up to do this. I believe the usual suggestion for users who ask this question is to use the phpmailer package. It does this more easily. Google for phpmailer. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail attachment
RTFM Bastien On Saturday, September 5, 2009, Grega Leskovšek legr...@gmail.com wrote: How do I attach a file in mail function or do I have to use PEAR (and if how ...). What are the advantages of PEAR? When do You suggest to use PEAR? Thanks in advance, -- Peace refuge: http://users.skavt.net/~gleskovs/ When the sun rises I receive and when it sets I forgive;) Grega Leskovšek -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail and mysql confirmation of that [double-opt in]
At 4:55 PM +0200 6/29/09, Grega Leskovsek wrote: how is the best way to check if email address is valid: is this preg_match() OK? preg_match('/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/', $email); How can I make double opt-in mail system? My idea: 1.) I remember the email entered and user data and the sha1($email); in mysql db 2.) I send email with activation link of the sha1($email); 3.) I am not clear how to proceed when the link is activated. How to update the db and submit the necessary form to the marketing. Thanks in advance, Double opt-in. 1. Have the user enter their email address via a form that let's them know they are subscribing to a service. You might want to check for a valid email address (many versions) and/or a CAPTCHA. additionally, you need to check if they have already registered OR in the process of registering. 2. After they submit their email address, then have your script create a unique token and record it coupled with the email address in your database. 3. Then send a confirmation email to that email address with the token appended as a link in the email -- with instructions for the receiver to either ignore the email (with apologies) or click the link and be taken back to your site where your script takes the confirmation token and checks your database for a token/email match. If there is one, then that completes the process and you have a confirmed double opt-in email address to use. If not, have them try again. Here's the script I wrote to do that: http://www.webbytedd.com/b/sub-email/index.php Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail and mysql confirmation of that [double-opt in]
Grega Leskovsek wrote: how is the best way to check if email address is valid: is this preg_match() OK? preg_match('/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/', $email); filter_var($email, FILTER_VALIDATE_EMAIL) How can I make double opt-in mail system? My idea: 1.) I remember the email entered and user data and the sha1($email); in mysql db 2.) I send email with activation link of the sha1($email); 3.) I am not clear how to proceed when the link is activated. How to update the db and submit the necessary form to the marketing. When the user clicks the activation link, mark the address active in the subscribers table, or move the entry from a pending table to a subscribers table. Then execute the email/whatever to marketing just as you would without using double opt-in. Thanks in advance, -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail function and hotmail
Hello, Thank you all for your cooperation yesterday. I tried PEAR Mail_mime as follows: function SendEmail($template, $params){ // Read and open the template file and the image file $htmlFile = fopen(./templates/$template.html, r); $txtFile = fopen(./templates/$template.txt, r); $htmlMsg = fread($htmlFile, filesize(./templates/$template.html)); $textMsg = fread($txtFile, filesize(./templates/$template.txt)); // Replace the template values foreach($params as $key = $value){ // Template values will always start with two hash marks ## if(substr($key, 0, 2) == ##){ $htmlMsg = str_replace($key, $value, $htmlMsg); $textMsg = str_replace($key, $value, $textMsg); } } // Create the appropiate headers $headers = array( From = n...@domain.ca, Reply-To = n...@domain.ca, Subject = $params[subject], Organization = Name ); // Create the mime object $mime = new Mail_mime(); $mime-setTxtBody($textMsg); $mime-setHTMLBody($htmlMsg); $mime-addHTMLImage(templates/emaillogo.jpg, image/jpg, templates/emaillogo.jpg); // Set the variables for the Mail object to send the message $body = $mime-get(); $headers = $mime-headers($headers); $mail = Mail::factory(mail); return $mail-send($params[email], $headers, $body); } However, hotmail is still getting blank emails when I sent them from my production machine (CentOS 5.3), however, when I send the message from my development machine (Visata Ultimate SP1) it does work correctly on hotmail address . Both machines are running php 5.2 and have the same PEAR packages. I tried Gmail, Yahoo mail and Thunderbird and they work fine. Your help will be much appreciated. Thank you, Fernando. Date: Wed, 10 Jun 2009 23:14:11 +0530 From: sudhee...@binaryvibes.co.in To: phps...@gmail.com CC: jfer...@hotmail.com; rich...@php.net; php-general@lists.php.net Subject: Re: [PHP] Mail function and hotmail Richard was likely suggestion his mail example as listed in his signature Other options include phpmailer pear's mime mail various other classes available www.phpclasses.org Fernando, I recommend you check out the various PHP frameworks out there. Instead of randomly searching for classes for common functionality like sending an email from your script, you could use the framework's classes. I am sure all of the frameworks provide classes to send emails. The next time you need a class to read email from your scripts, you can simply look for classes your framework of choice provides. I personally use Zend Framework. But there are many available - Cake, CI, Symphony, etc. Also take a look at PEAR like Bastien said. -- With warm regards, Sudheer. S Business: http://binaryvibes.co.in, Tech stuff: http://techchorus.net, Personal: http://sudheer.net _ Attention all humans. We are your photos. Free us. http://go.microsoft.com/?linkid=9666046
RE: [PHP] Mail function and hotmail
I decided to change the call to send to: $mail = Mail::factory(smtp, array(host = localhost)); return $mail-send($params[email], $headers, $body); and now hotmail wokrs. Maybe qmail changes something when the mail() function is used. Thank you for all your help. Fernando. From: jfer...@hotmail.com To: sudhee...@binaryvibes.co.in; phps...@gmail.com CC: rich...@php.net; php-general@lists.php.net Date: Thu, 11 Jun 2009 10:34:13 -0400 Subject: RE: [PHP] Mail function and hotmail Hello, Thank you all for your cooperation yesterday. I tried PEAR Mail_mime as follows: function SendEmail($template, $params){ // Read and open the template file and the image file $htmlFile = fopen(./templates/$template.html, r); $txtFile = fopen(./templates/$template.txt, r); $htmlMsg = fread($htmlFile, filesize(./templates/$template.html)); $textMsg = fread($txtFile, filesize(./templates/$template.txt)); // Replace the template values foreach($params as $key = $value){ // Template values will always start with two hash marks ## if(substr($key, 0, 2) == ##){ $htmlMsg = str_replace($key, $value, $htmlMsg); $textMsg = str_replace($key, $value, $textMsg); } } // Create the appropiate headers $headers = array( From = n...@domain.ca, Reply-To = n...@domain.ca, Subject = $params[subject], Organization = Name ); // Create the mime object $mime = new Mail_mime(); $mime-setTxtBody($textMsg); $mime-setHTMLBody($htmlMsg); $mime-addHTMLImage(templates/emaillogo.jpg, image/jpg, templates/emaillogo.jpg); // Set the variables for the Mail object to send the message $body = $mime-get(); $headers = $mime-headers($headers); $mail = Mail::factory(mail); return $mail-send($params[email], $headers, $body); } However, hotmail is still getting blank emails when I sent them from my production machine (CentOS 5.3), however, when I send the message from my development machine (Visata Ultimate SP1) it does work correctly on hotmail address . Both machines are running php 5.2 and have the same PEAR packages. I tried Gmail, Yahoo mail and Thunderbird and they work fine. Your help will be much appreciated. Thank you, Fernando. Date: Wed, 10 Jun 2009 23:14:11 +0530 From: sudhee...@binaryvibes.co.in To: phps...@gmail.com CC: jfer...@hotmail.com; rich...@php.net; php-general@lists.php.net Subject: Re: [PHP] Mail function and hotmail Richard was likely suggestion his mail example as listed in his signature Other options include phpmailer pear's mime mail various other classes available www.phpclasses.org Fernando, I recommend you check out the various PHP frameworks out there. Instead of randomly searching for classes for common functionality like sending an email from your script, you could use the framework's classes. I am sure all of the frameworks provide classes to send emails. The next time you need a class to read email from your scripts, you can simply look for classes your framework of choice provides. I personally use Zend Framework. But there are many available - Cake, CI, Symphony, etc. Also take a look at PEAR like Bastien said. -- With warm regards, Sudheer. S Business: http://binaryvibes.co.in, Tech stuff: http://techchorus.net, Personal: http://sudheer.net _ Attention all humans. We are your photos. Free us. http://go.microsoft.com/?linkid=9666046 _ We are your photos. Share us now with Windows Live Photos. http://go.microsoft.com/?linkid=9666047
Re: [PHP] Mail function and hotmail
On Wed, 2009-06-10 at 12:59 -0400, Fernando G wrote: Hello, I am sending an html message with and embedded image using the following code: // Read message from html template $message = fread(template.html, filesize(template.html)); // I replace the values in $message that are necessary to // fill the tempalte ... // Generate a boundary string $rand_value = md5(time()); $mime_boundary = -$rand_value; $headers = MIME-Version: 1.0\r\n; $headers .= From: Name n...@domain.com\r\n; $headers .= Reply-To: Name n...@domain.com\r\n; $headers .= Return-Path: n...@domain.com\r\n; $headers .= Organization: Name\r\n; $headers .= X-Mailer: PHP's mail() Function\r\n; $headers .= Content-Type: multipart/related; ; $headers .= boundary=\$mime_boundary\; type=\text/html\\r\n\r\n; $body = This is a multi-part message in MIME format.\r\n; $body .= --$mime_boundary\r\n; $body .= Content-Type: text/html; charset=UTF-8\r\n; $body .= Content-Transfer-Encoding: 7bit\r\n\r\n$message\r\n\r\n; $body .= --$mime_boundary\r\n; $body .= Content-Type: image/jpg\r\n; $body .= Content-Transfer-Encoding: base64\r\n; $body .= Content-ID: ggtourslogo\r\n\r\n; $body .= chunk_split(base64_encode(file_get_contents(./templates/emaillogo.jpg))); $body .= --$mime_boundary--; return mail(em...@domain.com, Subject, $body, $headers); However when it is send to a hotmail.com address the message is received blank. It does work fine with Gmail, Yahoo mail, Outlook Express and Thunderbird. Your help is much appreciated. Fernando _ We are your photos. Share us now with Windows Live Photos. http://go.microsoft.com/?linkid=9666047 As far as I'm aware, Hotmail blocks all images by default. Also, I've seen Outlook choke on message with the \r\n line endings, could Hotmail be doing that too? Thanks Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail function and hotmail
Hi, ... Use something that is already proven to work. It will save you an awful lot of time. -- Richard Heyes HTML5 graphing: RGraph (www.rgraph.net - updated 6th June) PHP mail: RMail (www.phpguru.org/rmail) PHP datagrid: RGrid (www.phpguru.org/rgrid) PHP Template: RTemplate (www.phpguru.org/rtemplate) PHP SMTP: http://www.phpguru.org/smtp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail function and hotmail
I have not idea of what else to use. Your suggestions are appreciated. Fernando. Date: Wed, 10 Jun 2009 18:04:31 +0100 From: rich...@php.net To: jfer...@hotmail.com CC: php-general@lists.php.net Subject: Re: [PHP] Mail function and hotmail Hi, ... Use something that is already proven to work. It will save you an awful lot of time. -- Richard Heyes HTML5 graphing: RGraph (www.rgraph.net - updated 6th June) PHP mail: RMail (www.phpguru.org/rmail) PHP datagrid: RGrid (www.phpguru.org/rgrid) PHP Template: RTemplate (www.phpguru.org/rtemplate) PHP SMTP: http://www.phpguru.org/smtp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Internet explorer 8 lets you browse the web faster. http://go.microsoft.com/?linkid=9655582
Re: [PHP] Mail function and hotmail
On Wed, Jun 10, 2009 at 1:11 PM, Fernando Gjfer...@hotmail.com wrote: I have not idea of what else to use. Your suggestions are appreciated. Fernando. Date: Wed, 10 Jun 2009 18:04:31 +0100 From: rich...@php.net To: jfer...@hotmail.com CC: php-general@lists.php.net Subject: Re: [PHP] Mail function and hotmail Hi, ... Use something that is already proven to work. It will save you an awful lot of time. -- Richard Heyes HTML5 graphing: RGraph (www.rgraph.net - updated 6th June) PHP mail: RMail (www.phpguru.org/rmail) PHP datagrid: RGrid (www.phpguru.org/rgrid) PHP Template: RTemplate (www.phpguru.org/rtemplate) PHP SMTP: http://www.phpguru.org/smtp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Internet explorer 8 lets you browse the web faster. http://go.microsoft.com/?linkid=9655582 Richard was likely suggestion his mail example as listed in his signature Other options include phpmailer pear's mime mail various other classes available www.phpclasses.org -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail function and hotmail
Hi, pear's mime mail I believe I had a hand in that too. It's like a bad rash - it gets everywhere... :-) -- Richard Heyes HTML5 graphing: RGraph (www.rgraph.net - updated 6th June) PHP mail: RMail (www.phpguru.org/rmail) PHP datagrid: RGrid (www.phpguru.org/rgrid) PHP Template: RTemplate (www.phpguru.org/rtemplate) PHP SMTP: http://www.phpguru.org/smtp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail function and hotmail
Thanks. I'll check that out. Date: Wed, 10 Jun 2009 18:24:45 +0100 Subject: Re: [PHP] Mail function and hotmail From: rich...@php.net To: phps...@gmail.com CC: jfer...@hotmail.com; php-general@lists.php.net Hi, pear's mime mail I believe I had a hand in that too. It's like a bad rash - it gets everywhere... :-) -- Richard Heyes HTML5 graphing: RGraph (www.rgraph.net - updated 6th June) PHP mail: RMail (www.phpguru.org/rmail) PHP datagrid: RGrid (www.phpguru.org/rgrid) PHP Template: RTemplate (www.phpguru.org/rtemplate) PHP SMTP: http://www.phpguru.org/smtp _ Internet explorer 8 lets you browse the web faster. http://go.microsoft.com/?linkid=9655582
Re: [PHP] Mail function and hotmail
Richard was likely suggestion his mail example as listed in his signature Other options include phpmailer pear's mime mail various other classes available www.phpclasses.org Fernando, I recommend you check out the various PHP frameworks out there. Instead of randomly searching for classes for common functionality like sending an email from your script, you could use the framework's classes. I am sure all of the frameworks provide classes to send emails. The next time you need a class to read email from your scripts, you can simply look for classes your framework of choice provides. I personally use Zend Framework. But there are many available - Cake, CI, Symphony, etc. Also take a look at PEAR like Bastien said. -- With warm regards, Sudheer. S Business: http://binaryvibes.co.in, Tech stuff: http://techchorus.net, Personal: http://sudheer.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail function and hotmail
Thank you. I'm looking at PEAR Mail_mime right now. It seems promising. Fernando. Date: Wed, 10 Jun 2009 23:14:11 +0530 From: sudhee...@binaryvibes.co.in To: phps...@gmail.com CC: jfer...@hotmail.com; rich...@php.net; php-general@lists.php.net Subject: Re: [PHP] Mail function and hotmail Richard was likely suggestion his mail example as listed in his signature Other options include phpmailer pear's mime mail various other classes available www.phpclasses.org Fernando, I recommend you check out the various PHP frameworks out there. Instead of randomly searching for classes for common functionality like sending an email from your script, you could use the framework's classes. I am sure all of the frameworks provide classes to send emails. The next time you need a class to read email from your scripts, you can simply look for classes your framework of choice provides. I personally use Zend Framework. But there are many available - Cake, CI, Symphony, etc. Also take a look at PEAR like Bastien said. -- With warm regards, Sudheer. S Business: http://binaryvibes.co.in, Tech stuff: http://techchorus.net, Personal: http://sudheer.net _ Attention all humans. We are your photos. Free us. http://go.microsoft.com/?linkid=9666046
Re: [PHP] mail body not decoded by base64_decode
Hello, on 05/29/2009 12:15 AM vuthecuong said the following: Hi all I'm using below function to send Japanese mail, mail clients such as outlook etc displayed Japanese text withou problems but if I viewed JP mail via web-based mail such as Gmail, the JP subject is normally displayed, however the JP body still base64 encoded strings, it still was not decoded yet. Could anyone tell me solution to solve this? That is because you said it is quoted-printable. Anyway, the encoding of the headers and the body is independent. You may want to try this MIME message composing and sending class that can handle all those details. Take a look at the test_multibyte_message.php script. http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos Find and post PHP jobs http://www.phpclasses.org/jobs/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail subject encoding breaks
On 5/11/09 11:58 AM, Thodoris t...@kinetix.gr wrote: On 11 May 2009 at 18:25, Thodoris wrote: Hi gang, I am using phpmailer to send some mail notifications in an intranet I've made. This is a sample code: $e-Subject = This is δφκξγκδφη garbidge κηδφκξγσ; Hi, I have had success with this in the past: $subject = This is δφκξγκδφη garbidge κηδφκξγσ; $e-Subject = mb_encode_mimeheader($subject, UTF-8, Q) ; Regards Ian Thanks Ian this works in most cases but there are times that still breaks the subject. I have experimented with: mb_encode_mimeheader($subject, UTF-8, B) as well but nothing seems to be working without problems. is it possible that in the problem cases the subject string isn't valid utf-8? you can check with mb_check_encoding($subject) you can sanitize bad utf-8 with iconv(UTF-8,UTF-8//IGNORE,$subject) though you probably won't get the string you want with that. when you don't have other options, this will at least clean up bad encoding. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail subject encoding breaks
On 11 May 2009 at 18:25, Thodoris wrote: Hi gang, I am using phpmailer to send some mail notifications in an intranet I've made. This is a sample code: $e-Subject = This is δφκξγκδφη garbidge κηδφκξγσ; Hi, I have had success with this in the past: $subject= This is δφκξγκδφη garbidge κηδφκξγσ; $e-Subject = mb_encode_mimeheader($subject, UTF-8, Q) ; Regards Ian -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail subject encoding breaks
On 11 May 2009 at 18:25, Thodoris wrote: Hi gang, I am using phpmailer to send some mail notifications in an intranet I've made. This is a sample code: $e-Subject = This is δφκξγκδφη garbidge κηδφκξγσ; Hi, I have had success with this in the past: $subject= This is δφκξγκδφη garbidge κηδφκξγσ; $e-Subject = mb_encode_mimeheader($subject, UTF-8, Q) ; Regards Ian Thanks Ian this works in most cases but there are times that still breaks the subject. I have experimented with: mb_encode_mimeheader($subject, UTF-8, B) as well but nothing seems to be working without problems. I think that this solved my problems since I noticed that it works fine until this moment. function mail_utf8($to, $subject = '(No subject)', $message = '', $header = '') { $header_ = 'MIME-Version: 1.0' . \r\n . 'Content-type: text/plain; charset=UTF-8' . \r\n; mail($to, =?UTF-8?B?.base64_encode($subject).'?=', $message, $header_ . $header); } -- Thodoris
Re: [PHP] MAIL Error
2009/4/22 Daniel Brown danbr...@php.net: On Wed, Apr 22, 2009 at 12:31, Jan G.B. ro0ot.w...@googlemail.com wrote: I believe that you all should just overread the huge signature. You've wasted a lot bandwidth with this discussion about the signature. :-) It's not interesting. You could have send your pointless replies to the person, skipping the mailing list, so that we aren't annoyed by your drivel which is send to thousnads of mail servers. You still have absolutely no idea of what this community is or was before you came along and tried to instill your own sanctimonious attitude and ideals on people. Trust me on this: nothing you ever, ever say will change people's minds here, Jan. Well, if nothing being said here can change peoples mind, then why do people argue on signatures here? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MAIL Error
2009/4/22 tedd tedd.sperl...@gmail.com: At 6:31 PM +0200 4/22/09, Jan G.B. wrote: I believe that you all should just overread the huge signature. You've wasted a lot bandwidth with this discussion about the signature. :-) It's not interesting. You could have send your pointless replies to the person, skipping the mailing list, so that we aren't annoyed by your drivel which is send to thousnads of mail servers. 2009/4/22 tedd tedd.sperl...@gmail.com: Second, if they insist on continuing this idiotic practice, then get a different email account for yourself. There are many places where you can get an email account (i.e., gmail, yahoo, etc.) and it's pretty simple to set one up so that you can use it from work. Some companies will fire you for using private email at work. = VERY GOOD TIP. Just because your company has idiotic practices doesn't mean that you have to follow suit. It's idiotic to speak about that crap! thanks for your time. time to get back on topic. Jan: Thanks for your input and you may be right, but you must also realize that this list governs itself, right? If I get tried of reading the same pointless excessive signature over and over again and want to comment about it, I will. Sure, do it. My point was that it seems ineffective to me to argue on such topics at all. But surely you can do whatever you want. Just like ... I or other readers can fill their killfile if such threads come more often. Your opinion as to IF I should say something, or not, carries little weight. When you've donated enough time helping others on this list, then perhaps that will change. Sorry, but that's a bad attitude in my opinion. It's like No matter how right or wrong you are, I will not listen to you unless you've kissed Johns feet 10 times, like I did. But for the moment, I think it's best for the OP to check with his work and see if he can reason with them. If not, I certainly have no reason to read the same drivel again and again. As such, I can skip questions posted by him -- and who does that hurt? I for myself would fell in laughter if a collegue comes to my desk, asking to remove network filters or the mandatory signature of our company. But on to your question: I guess it wouldn't hurt at all if you'd skip the reply regarding his signature. :-) Now if you have a problem with the way we moderate this list, then post your objections and we'll all consider them and adapt what works. So I have reached the limit of When you've donated enough time, yet? Great. But as I see it, refusing to trim excessive signatures is not one that works well on this list. Remember, we all donate our time AND we choose who we help. It's clear that you can chose whom to help. But what you actually do here is argueing on some off topic bytes. Surely, after everyone is giving opionions about that, it's gonna be the topic. But not a topic with any conclusions. Cheers, tedd Bye, Jan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MAIL Error
At 11:13 AM +0200 4/24/09, Jan G.B. wrote: 2009/4/22 tedd tedd.sperl...@gmail.com: Your opinion as to IF I should say something, or not, carries little weight. When you've donated enough time helping others on this list, then perhaps that will change. Sorry, but that's a bad attitude in my opinion. It's like No matter how right or wrong you are, I will not listen to you unless you've kissed Johns feet 10 times, like I did. Nonsense. It not about who kisses who's feet and you know it. You're deliberately clouding the issue in a failed attempt to support your position that signatures should of any length. That's bullshit. My point is that many of us donate our time on a regular basis to this list to help others. And those regulars I consider friends. As such their comments and opinions matter. Whereas, your opinion doesn't matter much because you haven't contributed anything I can remember other than a superior than thou attitude about my comments that a poster should trim his signature, which is considered normal and proper for posting to a list. It's not hard to find support for my claim, such as: http://en.wikipedia.org/wiki/Netiquette So please, if your going to do nothing but be argumentative and present obtuse opinion to boost your ego, then find something else to do with your time. As far as I can see, you are wasting it here. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MAIL Error
On Fri, Apr 24, 2009 at 10:03 AM, tedd tedd.sperl...@gmail.com wrote: At 11:13 AM +0200 4/24/09, Jan G.B. wrote: 2009/4/22 tedd tedd.sperl...@gmail.com: Your opinion as to IF I should say something, or not, carries little weight. When you've donated enough time helping others on this list, then perhaps that will change. Sorry, but that's a bad attitude in my opinion. It's like No matter how right or wrong you are, I will not listen to you unless you've kissed Johns feet 10 times, like I did. Nonsense. It not about who kisses who's feet and you know it. You're deliberately clouding the issue in a failed attempt to support your position that signatures should of any length. That's bullshit. My point is that many of us donate our time on a regular basis to this list to help others. And those regulars I consider friends. As such their comments and opinions matter. Whereas, your opinion doesn't matter much because you haven't contributed anything I can remember other than a superior than thou attitude about my comments that a poster should trim his signature, which is considered normal and proper for posting to a list. It's not hard to find support for my claim, such as: http://en.wikipedia.org/wiki/Netiquette So please, if your going to do nothing but be argumentative and present obtuse opinion to boost your ego, then find something else to do with your time. As far as I can see, you are wasting it here. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Don't make me send you to your rooms, girls. Play nice! -- Bastien Cat, the other other white meat
Re: [PHP] MAIL Error
2009/4/24 Bastien Koert phps...@gmail.com: On Fri, Apr 24, 2009 at 10:03 AM, tedd tedd.sperl...@gmail.com wrote: Whereas, your opinion doesn't matter much because you haven't contributed anything I can remember Tedd, it's not my problem that your sight is limited. I don't believe the Netiquette states that whatever one says, it doesn't matter unless the reader noticed whatever It's not hard to find support for my claim, such as: http://en.wikipedia.org/wiki/Netiquette So please, if your going to do nothing but be argumentative and present obtuse opinion to boost your ego, then find something else to do with your time. As far as I can see, you are wasting it here. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Don't make me send you to your rooms, girls. Play nice! Seems to be to late. That wasn't nice at all. -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MAIL Error
At 10:45 AM +0530 4/22/09, ramesh.marimu...@wipro.com wrote: Yeah its all garbage. But its from the company. I don't know how to trim it. Can anyone suggest? First, tell your company that they are making a fool of themselves on the net and do they want to continue the practice? After all, their practice is hindering you in your work for them. For example, when you post a question to this list, there are people who will pass on offering you advice because your signature makes you look like an idiot. Second, if they insist on continuing this idiotic practice, then get a different email account for yourself. There are many places where you can get an email account (i.e., gmail, yahoo, etc.) and it's pretty simple to set one up so that you can use it from work. Just because your company has idiotic practices doesn't mean that you have to follow suit. Cheers, tedd PS: You might also mention to the powers that be, they should clean up their web site. While they may want to project the we know it all image, their web site speaks volumes as to what they don't know. -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MAIL Error
I believe that you all should just overread the huge signature. You've wasted a lot bandwidth with this discussion about the signature. :-) It's not interesting. You could have send your pointless replies to the person, skipping the mailing list, so that we aren't annoyed by your drivel which is send to thousnads of mail servers. 2009/4/22 tedd tedd.sperl...@gmail.com: Second, if they insist on continuing this idiotic practice, then get a different email account for yourself. There are many places where you can get an email account (i.e., gmail, yahoo, etc.) and it's pretty simple to set one up so that you can use it from work. Some companies will fire you for using private email at work. = VERY GOOD TIP. Just because your company has idiotic practices doesn't mean that you have to follow suit. It's idiotic to speak about that crap! thanks for your time. time to get back on topic. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MAIL Error
On Wed, Apr 22, 2009 at 12:31, Jan G.B. ro0ot.w...@googlemail.com wrote: I believe that you all should just overread the huge signature. You've wasted a lot bandwidth with this discussion about the signature. :-) It's not interesting. You could have send your pointless replies to the person, skipping the mailing list, so that we aren't annoyed by your drivel which is send to thousnads of mail servers. You still have absolutely no idea of what this community is or was before you came along and tried to instill your own sanctimonious attitude and ideals on people. Trust me on this: nothing you ever, ever say will change people's minds here, Jan. 2009/4/22 tedd tedd.sperl...@gmail.com: Second, if they insist on continuing this idiotic practice, then get a different email account for yourself. There are many places where you can get an email account (i.e., gmail, yahoo, etc.) and it's pretty simple to set one up so that you can use it from work. Some companies will fire you for using private email at work. = VERY GOOD TIP. Those same companies will probably fire you for chatting about things unrelated to work via email. Take it in context. Just because your company has idiotic practices doesn't mean that you have to follow suit. It's idiotic to speak about that crap! thanks for your time. time to get back on topic. This is the topic, Jan. And if you can't play nice and adapt to the community, don't expect them to adapt to you --- or to be very welcome. ;-P -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php