[PHP] php mail() and sendmail/smtp
Okay, I know this is a Sendmail/SMTP admin issue, but it's PHP-related and I figured someone here might have a clue or might have solved this issue before. I've come into this dev server after many hands have touched it, and I'm not quite sure how to proceed, nor am I a Linux genius. We're using localhost on this in-house CentOS server for mail() with sendmail_path, sendmail_from, etc. set properly. I can get test emails sent to me using mail(), but my client can't get any script emails on their domain's mail server, which is on hostmonster. The daemon response emails are stuck in the queue as deferred - and what I've found through logs is that they're being rejected by the client's mail server because SMTP is sending it FROM apa...@new-host.xxx.com, even though that should be overridden when using mail() and our ini settings and headers. So that's a compound address of the apache account and 'new-host' which was apparently the machine name that was never changed in the beginning. My mail server apparently doesn't care that it can't do a reverse lookup on that non-existent subdomain and account, but the client's does. Also, we have Redmine running on the same server, and it sends admin emails out just fine - however, I don't think it calls sendmail directly like our PHP install, but connects directly to the local SMTP server. And I have tested a local telnet session to SMTP a mail manually, and that got through fine. So it seems to be how PHP is calling Sendmail, or Sendmail itself. Sendmail is being called as /usr/sbin/sendmail -t -i in the ini. Possible solutions? I'm a little frazzled and a little undereducated here. -- m -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() and sendmail/smtp
2010/12/2 Michael Crowl octo...@serv.net: * snip * Also, we have Redmine running on the same server, and it sends admin emails out just fine - however, I don't think it calls sendmail directly like our PHP install, but connects directly to the local SMTP server. Sounds like a solution to me: connect to port 25 on the mail server instead of going through sendmail. Plenty of good mail libraries out there (swiftmailer, phpmailer come to mind). Regards Peter -- hype WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() and sendmail/smtp
2010/12/2 Michael Crowl octo...@serv.net: Possible solutions? I'm a little frazzled and a little undereducated here. Use the under-appreciated fifth paramter in mail() to pass the -f flag to sendmail, like so: ?php $to = 'danbr...@php.net'; $subject = 'This is an emample for a php-general request!'; $body = 'This is the body of the email.'; $headers = From: daniel.br...@parasane.net\r\n; $headers .= X-Mailer: PHP/.phpversion().\r\n; $sendmail_flag = '-fdaniel.br...@parasane.net'; // Note the lack of space between the flag and variable mail($to,$subject,$body,$headers,$sendmail_flag); ? -- /Daniel P. Brown Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting (866-) 725-4321 http://www.parasane.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php mail() function and ezmlm
I'm having trouble sending info from a form to the list-subscr...@domain Does anyone know why ezmlm doesn't recognize the mail() function?
Re: [PHP] php mail() function and ezmlm
Can you send it to other email addresses? -- Vikash Kumar http://vika.sh On Thu, Jan 14, 2010 at 12:16 PM, Bob Strasser bstras...@noccorp.comwrote: I'm having trouble sending info from a form to the list-subscr...@domain Does anyone know why ezmlm doesn't recognize the mail() function?
Re: [PHP] php mail() function
After a long delay, I've finally got mail working. I had decided to move on in the book that I'm working through (Head First PHP MySQL) but doubled back to address the mail issue again. This is how I finally got it to work: 1. Switched to XAMPP for linux rather than using my existing versions of mysql, php and apache. 2. Uninstalled Postfix and reinstalled Sendmail. Then I followed the instructions here: http://dbaron.org/linux/sendmail I can't vouch that the method described at that link is completely safe and secure, but it worked for me and was very easy. I've spent many hours and days trying to get this to work so am very relieved. My only complaint is that there is quite a long delay after submitting report.html (from Ch. 1) while it says 'waiting for localhost...'. It can take up to 20 seconds or so before sending and giving confirmation. Thanks for all your help. On Mon, Oct 26, 2009 at 4:37 AM, Bob McConnell r...@cbord.com wrote: From: James Prentice I have tried setting both $to and $email to be the same shaw address since I assumed it should be recognized by the mail server, but it's still getting bounced. So why is 'www-d...@homemade' being listed as the sender? Any ideas? I strongly recommend you call the help desk at Shaw and ask them to explain what is happening. They should know what is going on with their servers. Everyone on this list appears to be guessing at the problem, which is not likely to help you. Bob McConnell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() function
It looks like using XAMPP wasn't strictly necessary. I tried running this example again using my previous versions of mysql and apache and it worked fine. So the key is to configure Sendmail as described at the URL I gave. On Wed, Nov 25, 2009 at 10:58 AM, James Prentice prentice@gmail.com wrote: After a long delay, I've finally got mail working. I had decided to move on in the book that I'm working through (Head First PHP MySQL) but doubled back to address the mail issue again. This is how I finally got it to work: 1. Switched to XAMPP for linux rather than using my existing versions of mysql, php and apache. 2. Uninstalled Postfix and reinstalled Sendmail. Then I followed the instructions here: http://dbaron.org/linux/sendmail I can't vouch that the method described at that link is completely safe and secure, but it worked for me and was very easy. I've spent many hours and days trying to get this to work so am very relieved. My only complaint is that there is quite a long delay after submitting report.html (from Ch. 1) while it says 'waiting for localhost...'. It can take up to 20 seconds or so before sending and giving confirmation. Thanks for all your help. On Mon, Oct 26, 2009 at 4:37 AM, Bob McConnell r...@cbord.com wrote: From: James Prentice I have tried setting both $to and $email to be the same shaw address since I assumed it should be recognized by the mail server, but it's still getting bounced. So why is 'www-d...@homemade' being listed as the sender? Any ideas? I strongly recommend you call the help desk at Shaw and ask them to explain what is happening. They should know what is going on with their servers. Everyone on this list appears to be guessing at the problem, which is not likely to help you. Bob McConnell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php mail() function
From: James Prentice I have tried setting both $to and $email to be the same shaw address since I assumed it should be recognized by the mail server, but it's still getting bounced. So why is 'www-d...@homemade' being listed as the sender? Any ideas? I strongly recommend you call the help desk at Shaw and ask them to explain what is happening. They should know what is going on with their servers. Everyone on this list appears to be guessing at the problem, which is not likely to help you. Bob McConnell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() function
Bob McConnell wrote: I strongly recommend you call the help desk at Shaw and ask them to explain what is happening. They should know what is going on with their servers. Everyone on this list appears to be guessing at the problem, which is not likely to help you. But they are educated guesses :) No seriously, without a definitive error message it is hard to say for sure. Since he only needs postfix on the server to allow php to email out I may have a different solution for him. I sent him my custom smtp_email function which talks to the ISPs SMTP server directly and supports authentication. Lets see if that help. -- John Nur wer im Wohlstand lebt, schimpft auf ihn. [Ludwig Marcuse] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() function
Paul M Foster wrote: 4. All due respect to Kranthi, but I believe he's wrong about relaying mail from your webserver to the ISP's mailserver. I believe the ISP's mailserver doesn't care, as long as the mail comes from your pipe. You could probably call yourself pi...@pepperoni.com and your ISP would accept it. It's just the From:. Again, I could be wrong. All the ISPs I have used so far require the user to authenticate even when on the same network. So if you want to relay through the SMTP server of your ISP you need to login first. I think that is what Kranthi said Try this: 1) Set up a password maps file (/etc/postfix/sasl_passwd) with the content: mail.ispserver.comusername:password Now Execute these commands # chown root:root /etc/postfix/sasl_passwd # chmod 600 /etc/postfix/sasl_passwd # postmap /etc/postfix/sasl_passwd And change your config to this /etc/postfix/main.cf: relayhost = mail.ispserver.com smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous Now reload postfix and try it again. # postfix reload -- John Question / Answer based CAPTCHA http://www.network-technologies.org/tiny.php?id=1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() function
Thanks, John. I set up the sasl_passwd file as per your instructions but am still getting status=bounced. I'm wondering, what should the values in main.cf be for 'myhostname' and 'mydestination'? These pages give some info on the Shaw mail servers, but I'm not certain which I should be using: http://www.shaw.ca/en-ca/CustomerCare/InternetSupport/Residential/Email/ServiceDetails.htm http://www.shaw.ca/en-ca/CustomerCare/InternetSupport/Residential/RoutersandShawServerNames.htm Also, I notice that in the mail.log file, the 'from:' value is 'www-d...@homemade'. The actual 'from:' value is provided to the php mail() function via a web form, so should be somebody's email address (e.g. my own in this case). from=www-d...@homemade, size=523, nrcpt=1 (queue active) Oct 24 12:49:40 homemade postfix/error[7530]: B80B7A70109: to=x...@gmail.com, relay=none, delay=0.04, delays=0.03/0/0/0.01, dsn=5.0.0, status=bounced (shawmail) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() function
James Prentice wrote: Also, I notice that in the mail.log file, the 'from:' value is 'www-d...@homemade'. The actual 'from:' value is provided to the php mail() function via a web form, so should be somebody's email address (e.g. my own in this case). I think PHP will use the apache user and domain to generate the email address. I use my own smtp function so I can't say for certain. One thing you could try is to use a valid email account on the server for the FROM address so that you can receive the bounced message. The actual message should contain more information. Alternatively attempt to increase the loglevel of postfix so you get exact feedback of why the connection is failing. As far as which server to use. I think this page lists the correct one: http://www.shaw.ca/en-ca/CustomerCare/InternetSupport/Residential/RoutersandShawServerNames.htm -- John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() function
It sends the bounced message to /var/mail/www-data and I get this: --19BE8A70109.1256417846/homemade Content-Description: Delivery report Content-Type: message/delivery-status Reporting-MTA: dns; homemade X-Postfix-Queue-ID: 19BE8A70109 X-Postfix-Sender: rfc822; www-d...@homemade Arrival-Date: Sat, 24 Oct 2009 13:57:26 -0700 (PDT) Final-Recipient: rfc822; x...@shaw.ca Action: failed Status: 5.0.0 Diagnostic-Code: X-Postfix; shawmail.vc.shawcable.net --19BE8A70109.1256417846/homemade Content-Description: Undelivered Message Content-Type: message/rfc822 Received: by homemade (Postfix, from userid 33) id 19BE8A70109; Sat, 24 Oct 2009 13:57:26 -0700 (PDT) To: x...@shaw.ca I will investigate how to change the loglevel of postfix, because right now the error messages don't seem very helpful (at least to me). Cheers On Sat, Oct 24, 2009 at 1:27 PM, John Black s...@network-technologies.org wrote: James Prentice wrote: Also, I notice that in the mail.log file, the 'from:' value is 'www-d...@homemade'. The actual 'from:' value is provided to the php mail() function via a web form, so should be somebody's email address (e.g. my own in this case). I think PHP will use the apache user and domain to generate the email address. I use my own smtp function so I can't say for certain. One thing you could try is to use a valid email account on the server for the FROM address so that you can receive the bounced message. The actual message should contain more information. Alternatively attempt to increase the loglevel of postfix so you get exact feedback of why the connection is failing. As far as which server to use. I think this page lists the correct one: http://www.shaw.ca/en-ca/CustomerCare/InternetSupport/Residential/RoutersandShawServerNames.htm -- John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() function
James Prentice wrote: It sends the bounced message to /var/mail/www-data and I get this: --19BE8A70109.1256417846/homemade Content-Description: Delivery report Content-Type: message/delivery-status Reporting-MTA: dns; homemade X-Postfix-Queue-ID: 19BE8A70109 X-Postfix-Sender: rfc822; www-d...@homemade Arrival-Date: Sat, 24 Oct 2009 13:57:26 -0700 (PDT) Final-Recipient: rfc822; x...@shaw.ca Action: failed Status: 5.0.0 Diagnostic-Code: X-Postfix; shawmail.vc.shawcable.net --19BE8A70109.1256417846/homemade Content-Description: Undelivered Message Content-Type: message/rfc822 Received: by homemade (Postfix, from userid 33) id 19BE8A70109; Sat, 24 Oct 2009 13:57:26 -0700 (PDT) To: x...@shaw.ca Although 5.0.0 actually means something else I'm pretty sure you are rejected because of an invalid sender address or domain. Use a sender address that is valid with your ISP's mail relay. Just my $0.02 -- per -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() function
I also suspect that the problem is due to the sender address, but I have tried using the shaw email address for the From: address that's given to the mail() function and it still gets bounced. It seems like the ISP should consider that address valid. On Sat, Oct 24, 2009 at 2:20 PM, Per olof Ljungmark p...@bsdlabs.com wrote: James Prentice wrote: It sends the bounced message to /var/mail/www-data and I get this: --19BE8A70109.1256417846/homemade Content-Description: Delivery report Content-Type: message/delivery-status Reporting-MTA: dns; homemade X-Postfix-Queue-ID: 19BE8A70109 X-Postfix-Sender: rfc822; www-d...@homemade Arrival-Date: Sat, 24 Oct 2009 13:57:26 -0700 (PDT) Final-Recipient: rfc822; x...@shaw.ca Action: failed Status: 5.0.0 Diagnostic-Code: X-Postfix; shawmail.vc.shawcable.net --19BE8A70109.1256417846/homemade Content-Description: Undelivered Message Content-Type: message/rfc822 Received: by homemade (Postfix, from userid 33) id 19BE8A70109; Sat, 24 Oct 2009 13:57:26 -0700 (PDT) To: x...@shaw.ca Although 5.0.0 actually means something else I'm pretty sure you are rejected because of an invalid sender address or domain. Use a sender address that is valid with your ISP's mail relay. Just my $0.02 -- per -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() function
But it seems like the 'From:' address being given to the PHP mail() function is maybe being ignored, because the error log lists 'www-d...@homemade' as being the sender, rather than listing the shaw address. The snippet from the PHP code: $email = $_POST['email']; ... mail($to, $subject, $msg, 'From:' . $email); I have tried setting both $to and $email to be the same shaw address since I assumed it should be recognized by the mail server, but it's still getting bounced. So why is 'www-d...@homemade' being listed as the sender? Any ideas? On Sat, Oct 24, 2009 at 9:17 PM, James Prentice prentice@gmail.com wrote: I also suspect that the problem is due to the sender address, but I have tried using the shaw email address for the From: address that's given to the mail() function and it still gets bounced. It seems like the ISP should consider that address valid. On Sat, Oct 24, 2009 at 2:20 PM, Per olof Ljungmark p...@bsdlabs.com wrote: James Prentice wrote: It sends the bounced message to /var/mail/www-data and I get this: --19BE8A70109.1256417846/homemade Content-Description: Delivery report Content-Type: message/delivery-status Reporting-MTA: dns; homemade X-Postfix-Queue-ID: 19BE8A70109 X-Postfix-Sender: rfc822; www-d...@homemade Arrival-Date: Sat, 24 Oct 2009 13:57:26 -0700 (PDT) Final-Recipient: rfc822; x...@shaw.ca Action: failed Status: 5.0.0 Diagnostic-Code: X-Postfix; shawmail.vc.shawcable.net --19BE8A70109.1256417846/homemade Content-Description: Undelivered Message Content-Type: message/rfc822 Received: by homemade (Postfix, from userid 33) id 19BE8A70109; Sat, 24 Oct 2009 13:57:26 -0700 (PDT) To: x...@shaw.ca Although 5.0.0 actually means something else I'm pretty sure you are rejected because of an invalid sender address or domain. Use a sender address that is valid with your ISP's mail relay. Just my $0.02 -- per -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() function
i faced the same problem quite a few times. the general email route is php script - sender smtp server - receiving mail server in your case path 2 is broken. meaning port 25 is blocked by your ISP the work around is: 1. see if your ISP provides you with an SMTP account that is not blocked (OR) 2. try using a socks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() function
Paul M Foster wrote: Regarding the rejection of dynamic IPs by smarthosts, are you saying that it's a blacklist of sorts that lets them know an IP is dynamic? (Serious question. I don't know the mechanism by which they determine what is and isn't a dynamic IP.) I run my own mail server and use the zen blocklist from spamhaus.org. The zen list combines all the the anti spam lists plus all IPs designated to end users (http://www.spamhaus.org/zen/) The reason for blocking end users is that a lot of SPAM is sent out by compromised machines from some home Internet connection. I am currently getting about 5 connections every 2 seconds from compromised computers attempting to spam my server. The origin is usually a dynamically assigned IP from Sprint or Comcast (USA ISPs). So blocking the end users from sending SPAM tends to cut down on a LOT of junk. Here is a bit more info about the end user blocklist. http://www.spamhaus.org/pbl/ -- John Question / Answer based CAPTCHA http://www.network-technologies.org/tiny.php?id=1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php mail() function
From: Paul M Foster Regarding the rejection of dynamic IPs by smarthosts, are you saying that it's a blacklist of sorts that lets them know an IP is dynamic? (Serious question. I don't know the mechanism by which they determine what is and isn't a dynamic IP.) You are talking about two different mechanisms here. The black or grey lists are services that track known open relays and other sources of spam, viruses and assorted malware. Anyone can subscribe to them and use them to validate relay requests. There are also services that keep track of valid domain addresses and the IP assigned to them. They are usually called DNS hosts. These can be polled to identify the IP address for authorized domains and hosts. There are even special records for the email severs within a domain. Most dynamically allocated IP addresses will not show up on these servers unless you have access to a service authorized to inject records. So basically, qmail did a DNS lookup on your host/domain name and did not find a record pointing to your server. Therefore it rejected your request. You will have to ask your ISP for the address of their SMTP and POP servers if you don't know them. But usually your email client is already configured to talk to them. I would just go into my Thunderbird setup and look up those addresses. Bob McConnell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() function
I found the mail server for my ISP (shawmail.vc.shawcable.net) and edited main.cf in the following manner: myhostname = shawcable.net relayhost = [shawmail.vc.shawcable.net] I still don't receive the mail from the PHP script though. The error log from /var/log/mail.log is this: Oct 23 21:00:31 homemade postfix/pickup[7044]: 6CA44A70109: uid=33 from=www-data Oct 23 21:00:31 homemade postfix/cleanup[7107]: 6CA44A70109: message-id=20091024040031.6ca44a70...@shawcable.net Oct 23 21:00:31 homemade postfix/qmgr[7045]: 6CA44A70109: from=www-d...@shawcable.net, size=527, nrcpt=1 (queue active) Oct 23 21:00:31 homemade postfix/error[7109]: 6CA44A70109: to=x...@gmail.com, relay=none, delay=0.04, delays=0.03/0/0/0.01, dsn=5.0.0, status=bounced ([shawmail.vc.shawcable.net]) Oct 23 21:00:31 homemade postfix/cleanup[7107]: 75517A7010A: message-id=20091024040031.75517a70...@shawcable.net Oct 23 21:00:31 homemade postfix/bounce[7110]: 6CA44A70109: sender non-delivery notification: 75517A7010A Oct 23 21:00:31 homemade postfix/qmgr[7045]: 75517A7010A: from=, size=2219, nrcpt=1 (queue active) Oct 23 21:00:31 homemade postfix/qmgr[7045]: 6CA44A70109: removed Oct 23 21:00:31 homemade postfix/error[7109]: 75517A7010A: to=www-d...@shawcable.net, relay=none, delay=0.03, delays=0.02/0/0/0.01, dsn=5.0.0, status=bounced ([shawmail.vc.shawcable.net]) Oct 23 21:00:31 homemade postfix/qmgr[7045]: 75517A7010A: removed Have I edited main.cf incorrectly, or are there other values that need to be edited? Cheers On Thu, Oct 22, 2009 at 6:24 PM, James Prentice prentice@gmail.com wrote: How would I determine my ISP's SMPT server ID? And do I need to edit main.cf in order to use that server? Also, is there a way to test the script just sending an email locally? I tried sending the email to use...@localhost, but the email was still not received. On Thu, Oct 22, 2009 at 4:15 PM, LinuxManMikeC linuxmanmi...@gmail.com wrote: The problem is you won't be trusted to deliver mail directly to most mail servers unless you have a static IP. Even then thats no guarantee. What you have to do is relay through your ISP's SMTP server where you're trusted. You should also be able to setup PHP to use your ISP's SMTP server and never touch the SMTP service on your local machine (if you don't feel like playing with Postfix). On Thu, Oct 22, 2009 at 3:56 PM, James Prentice prentice@gmail.com wrote: I'm trying to use the php mail() function to send a mail within a php script. This is using PHP 5.2.4 and Ubuntu Hardy Heron linux. The script runs fine and the return value of the mail function is TRUE, but the mail is never received. I'm trying to send an email to my gmail account via the local server on my machine, just to test if this script works. I installed postfix because I read in several places that people have had good luck with that mail program. From what I can tell, postfix is working. I can do: telnet localhost 25 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 homemade ESMTP Postfix (Ubuntu) ehlo localhost 250-homemade 250-PIPELINING 250-SIZE 1024 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN After the php script runs, I type 'mailq' and get the result 'mail queue is empty.' If I check /var/log/mail.log, this is what I see: Oct 21 23:54:35 homemade postfix/pickup[5735]: 2A31EA70109: uid=33 from=www-data Oct 21 23:54:35 homemade postfix/cleanup[7997]: 2A31EA70109: message-id=20091022065435.2a31ea70...@homemade Oct 21 23:54:35 homemade postfix/qmgr[5736]: 2A31EA70109: from=www-d...@homemade, size=499, nrcpt=1 (queue active) Oct 21 23:54:35 homemade postfix/error[7999]: 2A31EA70109: to=x...@gmail.com, relay=none, delay=0.04, delays=0.03/0/0/0.01, dsn=5.0.0, status=bounced (gmail.com) Oct 21 23:54:35 homemade postfix/cleanup[7997]: 3217DA7010A: message-id=20091022065435.3217da70...@homemade Oct 21 23:54:35 homemade postfix/qmgr[5736]: 3217DA7010A: from=, size=2095, nrcpt=1 (queue active) Oct 21 23:54:35 homemade postfix/bounce[8000]: 2A31EA70109: sender non-delivery notification: 3217DA7010A Oct 21 23:54:35 homemade postfix/qmgr[5736]: 2A31EA70109: removed Oct 21 23:54:35 homemade postfix/local[8001]: 3217DA7010A: to=www-d...@homemade, relay=local, delay=0.03, delays=0/0.02/0/0.01, dsn=2.0.0, status=sent (delivered to command: procmail -a $EXTENSION) Oct 21 23:54:35 homemade postfix/qmgr[5736]: 3217DA7010A: removed Any ideas? I am new both to php and postfix. Thanks for any help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() function
i never worked with postfix, but form my experience with hmail server i can say that you need to relay through a mail account of ISP(not the server itself) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() function
On Fri, Oct 23, 2009 at 09:11:25PM -0700, James Prentice wrote: I found the mail server for my ISP (shawmail.vc.shawcable.net) and edited main.cf in the following manner: myhostname = shawcable.net relayhost = [shawmail.vc.shawcable.net] I still don't receive the mail from the PHP script though. The error log from /var/log/mail.log is this: Oct 23 21:00:31 homemade postfix/pickup[7044]: 6CA44A70109: uid=33 from=www-data Oct 23 21:00:31 homemade postfix/cleanup[7107]: 6CA44A70109: message-id=20091024040031.6ca44a70...@shawcable.net Oct 23 21:00:31 homemade postfix/qmgr[7045]: 6CA44A70109: from=www-d...@shawcable.net, size=527, nrcpt=1 (queue active) Oct 23 21:00:31 homemade postfix/error[7109]: 6CA44A70109: to=x...@gmail.com, relay=none, delay=0.04, delays=0.03/0/0/0.01, dsn=5.0.0, status=bounced ([shawmail.vc.shawcable.net]) Oct 23 21:00:31 homemade postfix/cleanup[7107]: 75517A7010A: message-id=20091024040031.75517a70...@shawcable.net Oct 23 21:00:31 homemade postfix/bounce[7110]: 6CA44A70109: sender non-delivery notification: 75517A7010A Oct 23 21:00:31 homemade postfix/qmgr[7045]: 75517A7010A: from=, size=2219, nrcpt=1 (queue active) Oct 23 21:00:31 homemade postfix/qmgr[7045]: 6CA44A70109: removed Oct 23 21:00:31 homemade postfix/error[7109]: 75517A7010A: to=www-d...@shawcable.net, relay=none, delay=0.03, delays=0.02/0/0/0.01, dsn=5.0.0, status=bounced ([shawmail.vc.shawcable.net]) Oct 23 21:00:31 homemade postfix/qmgr[7045]: 75517A7010A: removed Have I edited main.cf incorrectly, or are there other values that need to be edited? 1. Not sure why you have square brackets around the relayhost value. 2. You're getting a bounce from the ISP's mail server, one indicating it still won't allow relay. 3. I suspect the relayhost name is wrong. This may be the name you find in the mail headers on messages relayed to you, but I doubt it's the one you should use to post to. I could be wrong, though. 4. All due respect to Kranthi, but I believe he's wrong about relaying mail from your webserver to the ISP's mailserver. I believe the ISP's mailserver doesn't care, as long as the mail comes from your pipe. You could probably call yourself pi...@pepperoni.com and your ISP would accept it. It's just the From:. Again, I could be wrong. 5. This would be a lot simpler if you just call Shaw and ask them for the name of the mailserver, and ask them if it's a problem for you to post mail from your internal webserver to their mailserver. Then ask them why such posts might bounce with a 5XX error. Paul Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() function
On Thu, Oct 22, 2009 at 06:24:14PM -0700, James Prentice wrote: How would I determine my ISP's SMPT server ID? And do I need to edit main.cf in order to use that server? What ID? There's no ID needed. You just configure postfix to relay any non-local mail sent to it to the SMTP server at your ISP. Check the headers in incoming mail sent to you for the name of that server. It's likely the same for both incoming and outgoing mail. Something like mail.myisp.com. One other note. People look at me like I'm crazy when I mention this, but I've seen it quite a bit at various internet mail servers. Sometimes, in order to accept email from you, the internet mail server must see you *receive* mail within a certain time period prior. That is, you have to go fetch your mail at the ISP, which opens a window into the SMTP server for a limited time. Then you can tender mail to the internet mail server. I don't know that your internet mail server operates this way, but it's something to consider. I've had to deal with this before myself. Configuring local SMTP servers, like postfix. Check and see if Ubuntu has some sort of setup utility for this. Or try dpkg-reconfigure postfix Setting up mail servers is tedious and error prone, unless you've done it a lot. Read The Fine Manual on postfix. Also, is there a way to test the script just sending an email locally? I tried sending the email to use...@localhost, but the email was still not received. It will work, assuming three things: 1. You have an actual user set up on the system to receive mail. That is, an actual user on the system, with an entry in the passwd file and a home directory, etc. 2. Postfix is configured to deliver truly local mail to local addresses. More postfix configuration fun. 3. Postfix is actually running and properly configured. If not configured properly, it may refuse to run. In any case, linuxmanmikec's comment about the internet mail server not trusting you on a dynamic IP is spot on. The web of email trust is such that internet mail servers only trust other internet mail servers. And *your* internet mail server will trust *you*. So to get mail to that other internet mail server over there, you'll have to give it to *your* internet mail server, which is the only one that internet mail server over there will trust. The bounce message you got indicates that relaying from you is forbidden at the destination mail server. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() function
Paul M Foster wrote: On Thu, Oct 22, 2009 at 06:24:14PM -0700, James Prentice wrote: One other note. People look at me like I'm crazy when I mention this, but I've seen it quite a bit at various internet mail servers. Sometimes, in order to accept email from you, the internet mail server must see you *receive* mail within a certain time period prior. That is, you have to go fetch your mail at the ISP, which opens a window into the SMTP server for a limited time. Then you can tender mail to the internet mail server. I don't know that your internet mail server operates this way, but it's something to consider. I've had to deal with this before myself. This is commonly known as POP lock and is one of the two main ways that a mail server allows you to relay a message. If you have authenticated via POP3 (i.e. checked your mail) in a certain period of time then the SMTP server will let you send. The other main one is by authentication (username/password) with the SMTP server when you attempt to send mail. In any case, linuxmanmikec's comment about the internet mail server not trusting you on a dynamic IP is spot on. The web of email trust is such that internet mail servers only trust other internet mail servers. And *your* internet mail server will trust *you*. So to get mail to that other internet mail server over there, you'll have to give it to *your* internet mail server, which is the only one that internet mail server over there will trust. The bounce message you got indicates that relaying from you is forbidden at the destination mail server. This is fairly accurate in premise but just to clarify. Mailservers don't operate like this by default and there is really no trust. There are public blacklists that a mailserver can be configured to use that tell the mailserver not to accept mail from servers on the blacklist. The blacklists may contain servers that allow anyone to relay email, compromised servers, servers known for spam, ip ranges known to be held by spammers and *ranges that ISPs designate as dynamic or used for subscribers (DSL, cable, dial-up customers, etc. because they shouldn't be relaying email). -- 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] php mail() function
On Thu, Oct 22, 2009 at 11:40:34PM -0500, Shawn McKenzie wrote: snip This is fairly accurate in premise but just to clarify. Mailservers don't operate like this by default and there is really no trust. There are public blacklists that a mailserver can be configured to use that tell the mailserver not to accept mail from servers on the blacklist. The blacklists may contain servers that allow anyone to relay email, compromised servers, servers known for spam, ip ranges known to be held by spammers and *ranges that ISPs designate as dynamic or used for subscribers (DSL, cable, dial-up customers, etc. because they shouldn't be relaying email). Regarding the rejection of dynamic IPs by smarthosts, are you saying that it's a blacklist of sorts that lets them know an IP is dynamic? (Serious question. I don't know the mechanism by which they determine what is and isn't a dynamic IP.) Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Mail Function
On Sat, 2009-06-20 at 20:30 -0600, David Swenson wrote: Julian, From my understanding of PHP's mail() function, it doesn't do anything more than send to the address you specified. On that note, I'd check things like: Email address typos The email your sending to your domain, is it already being forwarded? If so, do you get the email at your gmail account? If it's not being forwarded, add $additionalheaders to your script and CC: your gmail account when sending to your domain. See if it shows up there. Anyway those are somethings you could try as you have supplied no code to check syntax and/or given any other testing you've tried. Good Luck, David -Original Message- From: Julian Muscat Doublesin [mailto:opensourc...@gmail.com] Sent: Saturday, June 20, 2009 1:59 PM To: php-general@lists.php.net Subject: [PHP] PHP Mail Function Hello Everyone, I have written an e-mail function that sends e-mail to my domain that forwards it to a gmail account. When I use the gmail address directly it works fine. When I use my mail domain i don't get anything. Has anyone experienced this? Can anyone give me some advice? Thanks in advance Julian No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.364 / Virus Database: 270.12.81/2189 - Release Date: 06/20/09 06:15:00 I had this problem before, and it seems that spam filters of all descriptions were the culprit. Thanks Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Mail Function
Hello Everyone, I have written an e-mail function that sends e-mail to my domain that forwards it to a gmail account. When I use the gmail address directly it works fine. When I use my mail domain i don't get anything. Has anyone experienced this? Can anyone give me some advice? Thanks in advance Julian
RE: [PHP] PHP Mail Function
Julian, From my understanding of PHP's mail() function, it doesn't do anything more than send to the address you specified. On that note, I'd check things like: Email address typos The email your sending to your domain, is it already being forwarded? If so, do you get the email at your gmail account? If it's not being forwarded, add $additionalheaders to your script and CC: your gmail account when sending to your domain. See if it shows up there. Anyway those are somethings you could try as you have supplied no code to check syntax and/or given any other testing you've tried. Good Luck, David -Original Message- From: Julian Muscat Doublesin [mailto:opensourc...@gmail.com] Sent: Saturday, June 20, 2009 1:59 PM To: php-general@lists.php.net Subject: [PHP] PHP Mail Function Hello Everyone, I have written an e-mail function that sends e-mail to my domain that forwards it to a gmail account. When I use the gmail address directly it works fine. When I use my mail domain i don't get anything. Has anyone experienced this? Can anyone give me some advice? Thanks in advance Julian No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.364 / Virus Database: 270.12.81/2189 - Release Date: 06/20/09 06:15:00 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php+mail+TLS/SSL
Hi, I am using phpmailer currently to send email from my applications. My ISP is restricting the usage of email without SSL/TLS and my SMTP connections have started to fail... Any hints on the best approach to send email from php appplciations ?, I wish I could use my standard gmail/yahoo accounts like my desktop email program... Any help appreciated. Thanks. JCG -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php+mail+TLS/SSL
julian wrote: I am using phpmailer currently to send email from my applications. My ISP is restricting the usage of email without SSL/TLS and my SMTP connections have started to fail... Any hints on the best approach to send email from php appplciations ?, I think the best way is to have a local MTA (e.g. postfix), to which mail()/sendmail can simply drop emails in the filesystem. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php+mail+TLS/SSL
On Thu, February 14, 2008 8:34 am, julian wrote: I am using phpmailer currently to send email from my applications. My ISP is restricting the usage of email without SSL/TLS and my SMTP connections have started to fail... Any hints on the best approach to send email from php appplciations ?, I wish I could use my standard gmail/yahoo accounts like my desktop email program... Often times, you can write a tiny shell script to connect using an authentication password to the mail server, and then the rest go through as you are already authenticated... Not sure this applies to TLS/SSL, but it's worth a try. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP mail with attachment
Use something like http://phpmailer.sf.net/ which handles everything for you already :) Or: http://www.phpguru.org/static/htmlMimeMail5.html and http://www.phpguru.org/downloads/html.mime.mail/ -- Richard Heyes +44 (0)844 801 1072 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP mail with attachment
Hello to everyone!..I had problems with attaching a document to an email using PHP..can somebody share some ideas on how to properly do it? Thanks in advance! Vanessa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP mail with attachment
Vanessa Vega wrote: Hello to everyone!..I had problems with attaching a document to an email using PHP..can somebody share some ideas on how to properly do it? Use something like http://phpmailer.sf.net/ which handles everything for you already :) -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Mail function
For whatever reason I can't pass the variable $email into the mail function to make it send me an email..can anyone help? Here is my code ?php require(config.php); require(functions.php); //echo some styles to spice it up... echo style body { background: #131313; font-family: Verdana, Arial; font-weight: bold; font-size: 9px; color: #FF; } .register_box { border: 1px solid #323232; background: #202020; font-family: Verdana, Arial; font-weight: bold; font-size: 9px; color: #FF; } /style ; switch($_GET['action']) { case new: //-- //[New Registration] //-- if(!isset($_POST['register'])) { echo form action='register.php?action=new' method='POST' Username: br / input type='text' name='username' class='register_box' br / Email: br / input type='text' name='email' class='register_box' br / Password: br / input type='password' name='password' class='register_box' br / input type='submit' name='register' value='New Registration!' class='register_box' /form ; } elseif(isset($_POST['register'])) { $username = mysql_real_escape_string($_POST['username']); $password = mysql_real_escape_string($_POST['password']); $email = mysql_real_escape_string($_POST['email']); $activation_code = generateCode(25); $userq = SELECT username FROM user_system WHERE username = '$username' LIMIT 1; $emailq = SELECT email FROM user_system WHERE email = '$email' LIMIT 1; //put errors into an array $errors = array(); if(empty($username)) { $errors[] = The username field was blank! br /; } if(mysql_num_rows(mysql_query($userq)) 0) { $errors[] = The username given is already in use! Please try another one! br /; } if(empty($password)) { $errors[] = The password field was blank! br /; } if(empty($email)) { $errors[] = The email field was blank! br /; } if(mysql_num_rows(mysql_query($emailq)) 0) { $errors[] = The email given is already in use! Please try another one! br /; } if(count($errors) 0) { foreach($errors as $err) { echo $err; } } else { $sqlq = INSERT INTO user_system (username, password, email, is_activated, activation_code); $sqlq .= VALUES ('$username', '.md5($password).', '$email', '0', '$activation_code'); mysql_query($sqlq) or die(mysql_error()); echo $email; --- Its being passed down... echo Thanks for registering! You will recieve an email shortly containing your validation code, and a link to activate your account!; mail($email, New Registration, www.sitename.ca, won't pick itup. Thanks for registering on SITE NAME. Here are your login details: Username: .$username. Password: .$password. In order to login and gain full access, you must validate your account. Click here to validate: http://www.sitename.ca/login/register.php?action=activateuser=.$username.code=.$activation_code.; Thanks! [Webmaster] ); } } break; case activate: //-- //[Activate Account] //-- if(isset($_GET['user']) isset($_GET['code'])) { $username = mysql_real_escape_string($_GET['user']); if(mysql_num_rows(mysql_query(SELECT id FROM user_system WHERE username = '$username')) == 0) { echo That username is not in the database!; } else { $activate_query = SELECT is_activated FROM user_system WHERE username = '$username'; $is_already_activated = mysql_fetch_object(mysql_query($activate_query)) or die(mysql_error()); if($is_already_activated-is_activated == 1) { echo This user is already activated!; } else { $code = mysql_real_escape_string($_GET['code']); $code_query = SELECT activation_code FROM user_system WHERE username = '$username' LIMIT 1; $check_code = mysql_fetch_object(mysql_query($code_query)) or die(mysql_error()); if($code == $check_code-activation_code) { $update = UPDATE user_system SET is_activated = '1' WHERE username = '$username'; mysql_query($update) or die(mysql_error()); echo User $username has been activated! Thanks! You may now login!;
[PHP] PHP mail() problem
Hi, I'm having problem with character encoding in PHP mail functions. CODE: $headers.= Content-Type: text/html; charset=iso-8859-1; $headers .= MIME-Version: 1.0 ; $headers .= Content-Transfer-Encoding: 8bit.$eol.$eol; $headers .=Content-Type: multipart/alternative; boundary=0-92766976-1174383938=:29106; $to = [EMAIL PROTECTED]; $subject = $_POST['cat']; $body = $_POST['text']; if (mail($to, $subject, $body, $headers)) { echo('pMessage successfully sent!/pbr /a href=showarticle.php?cid=5id=3Povratak/a'); } else { echo('pMessage delivery failed.../pbr /a href=showarticle.php?cid=5id=3Povratak/a'); } Im receiving mail as you see using yahoo.com. It all works except it doesn't show croatian letters... I also tried with encoding utf-8, same thing... ČĆŽŠĐ Please help, thank you very much! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP mail() problem
2007. 03. 20, kedd keltezéssel 10.54-kor Delta Storm ezt írta: Hi, I'm having problem with character encoding in PHP mail functions. CODE: $headers.= Content-Type: text/html; charset=iso-8859-1; $headers .= MIME-Version: 1.0 ; $headers .= Content-Transfer-Encoding: 8bit.$eol.$eol; $headers .=Content-Type: multipart/alternative; boundary=0-92766976-1174383938=:29106; $to = [EMAIL PROTECTED]; $subject = $_POST['cat']; $body = $_POST['text']; you should check those values first before putting them into mail(). they can contain spammer tricks like putting newlines in the subject and then cc header lines or something similar if (mail($to, $subject, $body, $headers)) { echo('pMessage successfully sent!/pbr /a href=showarticle.php?cid=5id=3Povratak/a'); } else { echo('pMessage delivery failed.../pbr /a href=showarticle.php?cid=5id=3Povratak/a'); } Im receiving mail as you see using yahoo.com. It all works except it doesn't show croatian letters... I also tried with encoding utf-8, same thing... ČĆŽŠĐ what is the charset of the webpage displaying the form which triggers this function? it must be set to the same value as the email otherwise your email sending function won't receive the croatian letters at all, so it cannot send them too... hope that helps Zoltán Németh Please help, thank you very much! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP mail() problem
Hi. Recently I have this kind of issue. This is a possible solution: $text=message text; $subject=message subject; $header=From: [EMAIL PROTECTED]. MIME-Version: 1.0\r\n. Content-type: text/html; charset=utf-8\r\n. Content-Transfer-Encoding: 8bit\r\n; $subject2=utf8_encode($subject); $text2=utf8_encode($text); mail([EMAIL PROTECTED],$subject,$text2,$header); This encodes message to UTF-8 and should work. 2007. március 20. 10.54 dátummal Delta Storm ezt írta: Hi, I'm having problem with character encoding in PHP mail functions. CODE: $headers.= Content-Type: text/html; charset=iso-8859-1; $headers .= MIME-Version: 1.0 ; $headers .= Content-Transfer-Encoding: 8bit.$eol.$eol; $headers .=Content-Type: multipart/alternative; boundary=0-92766976-1174383938=:29106; $to = [EMAIL PROTECTED]; $subject = $_POST['cat']; $body = $_POST['text']; if (mail($to, $subject, $body, $headers)) { echo('pMessage successfully sent!/pbr /a href=showarticle.php?cid=5id=3Povratak/a'); } else { echo('pMessage delivery failed.../pbr /a href=showarticle.php?cid=5id=3Povratak/a'); } Im receiving mail as you see using yahoo.com. It all works except it doesn't show croatian letters... I also tried with encoding utf-8, same thing... ČĆŽŠĐ Please help, thank you very much! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP mail() problem
On Tue, March 20, 2007 4:54 am, Delta Storm wrote: Disclosure: What I understand of Unicode could fit in a matchbook... I'm having problem with character encoding in PHP mail functions. CODE: $headers.= Content-Type: text/html; charset=iso-8859-1; $headers .= MIME-Version: 1.0 ; $headers .= Content-Transfer-Encoding: 8bit.$eol.$eol; WILD GUESS ALERT!!! You're trying to pass 16-bit characters in an 8bit transfer encoding, whatever the heck that is... Seems to me you need a bigger bucket... You do realize that sending HTML Enhanced (cough, cough) email is quite likely to get it marked as spam and never seen by the intended recipient, right?... -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP mail form spam checking
A couple of days ago somebody posted a message with a routine to check input fields for potential spam/hacking. I believe it was on this list, but not sure. Of course I can't find that message any more... Could the original poster, please repost? Thanks. Gerry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php mail function vs smtp server
Hi does anyone know whats better/uses less resource etc: If I run a loop to send a 1000 emails, should I use php's mail fucntions or send directly to the servers smtp server. clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail function vs smtp server
On Mon, Oct 31, 2005 at 12:10:02PM +0200, Clive wrote: does anyone know whats better/uses less resource etc: If I run a loop to send a 1000 emails, should I use php's mail fucntions or send directly to the servers smtp server. What do you mean by send directly? Are you thinking of sending mail manually through making a socket connection or something? Paul -- Rogue Tory http://www.roguetory.org.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail function vs smtp server
Hi Clive, Monday, October 31, 2005, 10:10:02 AM, you wrote: does anyone know whats better/uses less resource etc: If I run a loop to send a 1000 emails, should I use php's mail fucntions or send directly to the servers smtp server. Use PEAR Mail Queue. Cheers, Rich -- Zend Certified Engineer http://www.launchcode.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail function vs smtp server
Clive wrote: Hi does anyone know whats better/uses less resource etc: If I run a loop to send a 1000 emails, should I use php's mail fucntions or send directly to the servers smtp server. Depends on your setup. If you're on Linux/Unix you could use the mail() function along with the -odq option to Sendmail/Postfix/Exim etc (fifth argument to the mail() function) which will dump all the mails into the MTAs queue. After this, the MTA will handle delivery. This is probably the quickest for this platform. -- Richard Heyes http://www.phpguru.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail function vs smtp server
On Mon, Oct 31, 2005 at 12:38:09PM +0200, Clive wrote: what I mean is: im using a class called phpmailer and it has the option to sent to a smtp server, I suppose this means that they do open a socket to the smtp server. All that means is that you can specify an external SMTP server (e.g. mail.myisp.com), whereas mail() will use localhost instead. In this case mail() would probably be quite a bit faster (though only if you're sending thousands and thousands of emails) because it won't have to send stuff out beyond the local machine. Depending on what you want to do and how much control you have over the machine your PHP scripts are running on, you might want to run a local mail server that just relays everything to an external source (whatever SMTP server you're currently using) - that way you can send everything to that and your PHP script should return control a bit faster. Paul -- Rogue Tory http://www.roguetory.org.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail function vs smtp server
On 31 Oct 2005, at 10:34, Richard Heyes wrote: Depends on your setup. If you're on Linux/Unix you could use the mail() function along with the -odq option to Sendmail/Postfix/ Exim etc (fifth argument to the mail() function) which will dump all the mails into the MTAs queue. After this, the MTA will handle delivery. This is probably the quickest for this platform. I agree. Sending directly is usually reserved for Windows machines with no local MTA and is usually way slower and doesn't handle queuing. I'd advise anyone to use PHPMailer for mail anyway as it makes it much more reliable to deal with all the other stuff like MIME encoding, plus it has support for all these sending methods without having to change much code. I use it with qmail. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail function vs smtp server
On Mon, Oct 31, 2005 at 12:56:01PM +0200, Clive wrote: Thanks I actually want to send 24 000 emails with 2 meg attachments. Oh. You definitely don't want to be using an external SMTP server if you can help it then, and you should really be splitting those up into chunks (no more than 1,000 at a time really) using something like PEAR Queue as has already been suggested. There also another option with the class: using the sendmail program, but won't the php mail function use sendmail anyway As far as I know, mail() just sends stuff to whatever the sendmail binary is on your system, although I haven't really looked into it. Of course you don't have to be running sendmail as most MTA will install binaries such as /usr/sbin/sendmail which actually point to postfix or qmail or whatever you're running. Paul -- Rogue Tory http://www.roguetory.org.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail function vs smtp server
On Mon, October 31, 2005 4:10 am, Clive wrote: does anyone know whats better/uses less resource etc: If I run a loop to send a 1000 emails, should I use php's mail fucntions or send directly to the servers smtp server. SMTP PHP's mail() function was never designed for high-volume email. It fires up a different process of sendmail for EACH email. This is NOT cheap, nor efficient. mail() is convenient. It is not efficient. Use mail() for quickie one-off emails. Use something else for mass email. There are classes/packages you can use to make this painless. http://phpclasses.org has at least one that gets used/recommended a lot. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail function vs smtp server
On Mon, October 31, 2005 5:22 am, Paul Waring wrote: On Mon, Oct 31, 2005 at 12:56:01PM +0200, Clive wrote: Thanks I actually want to send 24 000 emails with 2 meg attachments. Woof. mail() is DEFINITELY the wrong answer! Firing up an SMTP connection and spewing 24,000 emails with 2 meg attachments at it is *ALSO* a wrong answer, almost for sure. You will probably have a very unhappy SysAdmin behind that SMTP server, and odds are really really really good they'll have a long line of VERY unhappy SysAdmins behind them. You can pretty much count on being labeled (hopefully mis-labeled) as a spammer almost immediately. 2 meg attachments are your first biggest problem. Lose them. Include a link to whatever it is for the user to download the 2 meg at their leisure. This is non-negotiable. You WILL regret the 2 meg attachment long before the 24,000th user gets it. Queue up the emails and send them out over a controlled time. If there's ANY question that somebody might not want this email, don't send it. Get them to opt-in first, if you haven't already. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP mail
I am relatively new to PHP and could use some help. I have a form, which is basically in an email format, from, subject, and message. How do I then send this to an email? I know a bit about the mail function, somebody show me the ropes please! Eustace
Re: [PHP] PHP mail
Eustace wrote: I am relatively new to PHP and could use some help. I have a form, which is basically in an email format, from, subject, and message. How do I then send this to an email? I know a bit about the mail function, somebody show me the ropes please! Eustace Everything you need to know should be gleamed from the following page: http://ca3.php.net/manual/en/function.mail.php Check the examples, and you'll be well on your way. -- Aaron Gould Programmer/Systems Administrator PARTS CANADA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP mail
I am relatively new to PHP and could use some help. I have a form, which is basically in an email format, from, subject, and message. How do I then send this to an email? I know a bit about the mail function, somebody show me the ropes please! See the example here: http://us2.php.net/manual/en/function.mail.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP mail
Hi On 5/5/05, Aaron Gould [EMAIL PROTECTED] wrote: Eustace wrote: I am relatively new to PHP and could use some help. I have a form, which is basically in an email format, from, subject, and message. How do I then send this to an email? I know a bit about the mail function, somebody show me the ropes please! Eustace Everything you need to know should be gleamed from the following page: http://ca3.php.net/manual/en/function.mail.php check this too http://zend.com/codex.php?CID=11 Check the examples, and you'll be well on your way. -- Aaron Gould Programmer/Systems Administrator PARTS CANADA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- bala balachandar muruganantham blog lynx http://chandar.blogspot.com web http://www.chennaishopping.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP - mail problems - HELP!!! PLEASE
I am having trouble with PHP 5.0.3. I am running Apache 1.3.29. I am running Solaris 9 x86 on an Intel box. I get no errors when I start Apache. I get no errors when I run configtest. My problem is mail() does not work. It does invoke sendmail as there is activity in sendmail log. When I get an error page it does not display PHP is exposed. It is exposed in php.ini. register_globals is turned on right now. Variables to parse into values. $MESG = $_POST['comments']; parses to values. This is the log from sendmail. The first is sending mail from WEBMIN. The second is sending from PHP mail(). 'WEBMIN' Jan 14 20:03:13 www sendmail[17613]: [ID 801593 mail.info] j0F23DBA017613: [EMAIL PROTECTED], size=889, class=0, nrcpts=1, msgid=[EMAIL PROTECTED], [EMAIL PROTECTED] Jan 14 20:03:14 www sendmail[17616]: [ID 801593 mail.info] j0F23D4b017616: from=[EMAIL PROTECTED], size=1083, class=0, nrcpts=1, msgid=[EMAIL PROTECTED], proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] Jan 14 20:03:14 www sendmail[17613]: [ID 801593 mail.info] j0F23DBA017613: [EMAIL PROTECTED], [EMAIL PROTECTED] (0/1), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30889, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (j0F23D4b017616 Message accepted for delivery) Jan 14 20:03:15 www sendmail[17618]: [ID 801593 mail.info] j0F23D4b017616: to=[EMAIL PROTECTED], ctladdr=[EMAIL PROTECTED] (0/1), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=121083, relay=boredomsoftware.com. [67.18.56.2], dsn=2.0.0, stat=Sent (OK id=1CpdH0-00067K-Lb) 'PHP mail()' Jan 14 20:04:41 www sendmail[17630]: [ID 801593 mail.info] j0F24f8b017630: from=nobody, size=200, class=0, nrcpts=0, msgid=[EMAIL PROTECTED], [EMAIL PROTECTED] Can someone please help me figure this out? I am desperate!! I am also at my wits end. I have been fighting with this for a week. Kelly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - mail problems - HELP!!! PLEASE
Kelly wrote: I am having trouble with PHP 5.0.3. I am running Apache 1.3.29. I am running Solaris 9 x86 on an Intel box. I get no errors when I start Apache. I get no errors when I run configtest. My problem is mail() does not work. It does invoke sendmail as there is activity in sendmail log. When I get an error page it does not display PHP is exposed. It is exposed in php.ini. register_globals is turned on right now. Variables to parse into values. $MESG = $_POST['comments']; parses to values. This is the log from sendmail. The first is sending mail from WEBMIN. The second is sending from PHP mail(). 'WEBMIN' Jan 14 20:03:13 www sendmail[17613]: [ID 801593 mail.info] j0F23DBA017613: [EMAIL PROTECTED], size=889, class=0, nrcpts=1, msgid=[EMAIL PROTECTED], [EMAIL PROTECTED] Jan 14 20:03:14 www sendmail[17616]: [ID 801593 mail.info] j0F23D4b017616: from=[EMAIL PROTECTED], size=1083, class=0, nrcpts=1, msgid=[EMAIL PROTECTED], proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] Jan 14 20:03:14 www sendmail[17613]: [ID 801593 mail.info] j0F23DBA017613: [EMAIL PROTECTED], [EMAIL PROTECTED] (0/1), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30889, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (j0F23D4b017616 Message accepted for delivery) Jan 14 20:03:15 www sendmail[17618]: [ID 801593 mail.info] j0F23D4b017616: to=[EMAIL PROTECTED], ctladdr=[EMAIL PROTECTED] (0/1), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=121083, relay=boredomsoftware.com. [67.18.56.2], dsn=2.0.0, stat=Sent (OK id=1CpdH0-00067K-Lb) 'PHP mail()' Jan 14 20:04:41 www sendmail[17630]: [ID 801593 mail.info] j0F24f8b017630: from=nobody, size=200, class=0, nrcpts=0, msgid=[EMAIL PROTECTED], [EMAIL PROTECTED] Can someone please help me figure this out? I am desperate!! I am also at my wits end. I have been fighting with this for a week. Kelly What do you mean by: When I get an error page it does not display PHP is exposed. It is exposed in php.ini. Is mail() returning an error? If so, what is it? Have you had the same PHP code working in a different environment? If you haven't figured out the problem yet, post your PHP code here. -John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail
PHPDiscuss - PHP Newsgroups and mailing lists wrote: I have a dedicated Red Hat linux boxed leased from Interland and the php mail function does not work. I have found several articles on things to try and have tried everything I saw but to no avail. I set up a php script to mail and then print the return code and I get a 1 (success). But the mail never arrives. Is there any way I could get some help with this. I could post my phpinfo() information or anything else that may help. After doing all the other suggestions, su to the PHP user, and see if *that* user has permission to send email. If not, change that permission setup to allow that user to send email. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php mail
I have a dedicated Red Hat linux boxed leased from Interland and the php mail function does not work. I have found several articles on things to try and have tried everything I saw but to no avail. I set up a php script to mail and then print the return code and I get a 1 (success). But the mail never arrives. Is there any way I could get some help with this. I could post my phpinfo() information or anything else that may help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php mail
I have a dedicated Red Hat linux boxed leased from Interland and the php mail function does not work. I have found several articles on things to try and have tried everything I saw but to no avail. I set up a php script to mail and then print the return code and I get a 1 (success). But the mail never arrives. Is there any way I could get some help with this. I could post my phpinfo() information or anything else that may help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php Mail not working properly
I have a dedicated Red Hat linux boxed leased from Interland and the php mail function does not work. I have found several articles on things to try and have tried everything I saw but to no avail. I set up a php script to mail and then print the return code and I get a 1 (success). But the mail never arrives. Is there any way I could get some help with this. I could post my phpinfo() information or anything else that may help. Can you send mail from the server? Meaning: $ echo Testing email | sendmail [EMAIL PROTECTED] Did you receive the mail? Can you send mail to the server itself by replying back to the email? If your answer is no to at least the first part, then you need to setup a mail server. -- --Matthew Sims --http://killermookie.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Php Mail not working properly
I have a dedicated Red Hat linux boxed leased from Interland and the php mail function does not work. I have found several articles on things to try and have tried everything I saw but to no avail. I set up a php script to mail and then print the return code and I get a 1 (success). But the mail never arrives. Is there any way I could get some help with this. I could post my phpinfo() information or anything else that may help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP mail redirect ??
Hello, I have been playing around with a web mail app called NOCC (http://nocc.sourceforge.net/) It has some nice features and is quick. I want to add in a redirect button for mail, there is a forward button but it forwards mail just like a regular client for ... as expected. But I want a redirect button so I could send the exact same message to the same user and from the same person just but to another mail box on a different machine. Is there a easy to do this with out having to create some thing from scratch. Thanks .. Michael. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP mail redirect ??
But I want a redirect button so I could send the exact same message to the same user and from the same person just but to another mail box on a different machine. Not sure I've ever hear the term redirect used in reference to email. Understand that email cannot be received on just any machine (there needs to be a pop (or imap or smtp) deamon running on that machine. But to answer you question, you can often send email to a specific machine if you know the machine name in the following form; [EMAIL PROTECTED] - but keep in mind that there needs to be a daemon running on that machine AND there needs to be a mailbox for bert set up on that server. HTH Warren Vail -Original Message- From: Michael Gale [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 7:26 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP mail redirect ?? Hello, I have been playing around with a web mail app called NOCC (http://nocc.sourceforge.net/) It has some nice features and is quick. I want to add in a redirect button for mail, there is a forward button but it forwards mail just like a regular client for ... as expected. But I want a redirect button so I could send the exact same message to the same user and from the same person just but to another mail box on a different machine. Is there a easy to do this with out having to create some thing from scratch. Thanks .. Michael. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP mail redirect ??
Hello, There is another smtp server ... I should of provided more info ... I set up a postfix server to do the following: 1. Receives mail from outside ... if it is NOT spam 2. Virus scanned and then forward to exchange if it IS SPAM 2. Sent to a virtual type mail box and virus scanned. This way users would never get mail that is considered SPAM in there Exchange Inbox. Each morning they will get 1 e-mail containing a out line of new mail in the virtual account that is considered spam. That e-mail will be automatically deleted after 30 days. They can login via the web interface and download mail, formail to them selves only. I was hopping to add in a redirect type of feature where the e-mail would get sent to their actual Inbox on Exchange and not look like it was forwarded from the virtual account if the user clicks the a button. Thanks for the reply. Michael. Vail, Warren wrote: But I want a redirect button so I could send the exact same message to the same user and from the same person just but to another mail box on a different machine. Not sure I've ever hear the term redirect used in reference to email. Understand that email cannot be received on just any machine (there needs to be a pop (or imap or smtp) deamon running on that machine. But to answer you question, you can often send email to a specific machine if you know the machine name in the following form; [EMAIL PROTECTED] - but keep in mind that there needs to be a daemon running on that machine AND there needs to be a mailbox for bert set up on that server. HTH Warren Vail -Original Message- From: Michael Gale [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 7:26 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP mail redirect ?? Hello, I have been playing around with a web mail app called NOCC (http://nocc.sourceforge.net/) It has some nice features and is quick. I want to add in a redirect button for mail, there is a forward button but it forwards mail just like a regular client for ... as expected. But I want a redirect button so I could send the exact same message to the same user and from the same person just but to another mail box on a different machine. Is there a easy to do this with out having to create some thing from scratch. Thanks .. Michael. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP mail redirect ??
OK, now we are getting somewhere. On my machines, this is referred to as an email forwarder and yes SMTP handles it, however, I am not sure how you are handling your spam detection. On my servers I use spam assassin and it's detection is not fool proof. If people send images in their email with a signature, spam assassin will sometimes miss identify their email as spam. I would check the documentation for your spam filter for most of the redirection you would like to do. Warren Vail (415) 667-0240 SF211-07-434 -Original Message- From: Michael Gale [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 7:48 PM To: Vail, Warren; [EMAIL PROTECTED] Subject: Re: [PHP] PHP mail redirect ?? Hello, There is another smtp server ... I should of provided more info ... I set up a postfix server to do the following: 1. Receives mail from outside ... if it is NOT spam 2. Virus scanned and then forward to exchange if it IS SPAM 2. Sent to a virtual type mail box and virus scanned. This way users would never get mail that is considered SPAM in there Exchange Inbox. Each morning they will get 1 e-mail containing a out line of new mail in the virtual account that is considered spam. That e-mail will be automatically deleted after 30 days. They can login via the web interface and download mail, formail to them selves only. I was hopping to add in a redirect type of feature where the e-mail would get sent to their actual Inbox on Exchange and not look like it was forwarded from the virtual account if the user clicks the a button. Thanks for the reply. Michael. Vail, Warren wrote: But I want a redirect button so I could send the exact same message to the same user and from the same person just but to another mail box on a different machine. Not sure I've ever hear the term redirect used in reference to email. Understand that email cannot be received on just any machine (there needs to be a pop (or imap or smtp) deamon running on that machine. But to answer you question, you can often send email to a specific machine if you know the machine name in the following form; [EMAIL PROTECTED] - but keep in mind that there needs to be a daemon running on that machine AND there needs to be a mailbox for bert set up on that server. HTH Warren Vail -Original Message- From: Michael Gale [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 7:26 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP mail redirect ?? Hello, I have been playing around with a web mail app called NOCC (http://nocc.sourceforge.net/) It has some nice features and is quick. I want to add in a redirect button for mail, there is a forward button but it forwards mail just like a regular client for ... as expected. But I want a redirect button so I could send the exact same message to the same user and from the same person just but to another mail box on a different machine. Is there a easy to do this with out having to create some thing from scratch. Thanks .. Michael. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP mail redirect ??
I am using bogofilter and it works well ... so far. Postfix is taking care of the redirection with regards to redirecting spam mail to the virtual account. What I need now is a way for the user to say ... wait this is not spam, redirect / forward back to my Inbox. The web interface provides a decent method and forwards the mail like a regular mail client. I was hoping to make the moving of e-mails in the spam account to the Exchange Inbox a little smoother .. Michael. Vail, Warren wrote: OK, now we are getting somewhere. On my machines, this is referred to as an email forwarder and yes SMTP handles it, however, I am not sure how you are handling your spam detection. On my servers I use spam assassin and it's detection is not fool proof. If people send images in their email with a signature, spam assassin will sometimes miss identify their email as spam. I would check the documentation for your spam filter for most of the redirection you would like to do. Warren Vail (415) 667-0240 SF211-07-434 -Original Message- From: Michael Gale [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 7:48 PM To: Vail, Warren; [EMAIL PROTECTED] Subject: Re: [PHP] PHP mail redirect ?? Hello, There is another smtp server ... I should of provided more info ... I set up a postfix server to do the following: 1. Receives mail from outside ... if it is NOT spam 2. Virus scanned and then forward to exchange if it IS SPAM 2. Sent to a virtual type mail box and virus scanned. This way users would never get mail that is considered SPAM in there Exchange Inbox. Each morning they will get 1 e-mail containing a out line of new mail in the virtual account that is considered spam. That e-mail will be automatically deleted after 30 days. They can login via the web interface and download mail, formail to them selves only. I was hopping to add in a redirect type of feature where the e-mail would get sent to their actual Inbox on Exchange and not look like it was forwarded from the virtual account if the user clicks the a button. Thanks for the reply. Michael. Vail, Warren wrote: But I want a redirect button so I could send the exact same message to the same user and from the same person just but to another mail box on a different machine. Not sure I've ever hear the term redirect used in reference to email. Understand that email cannot be received on just any machine (there needs to be a pop (or imap or smtp) deamon running on that machine. But to answer you question, you can often send email to a specific machine if you know the machine name in the following form; [EMAIL PROTECTED] - but keep in mind that there needs to be a daemon running on that machine AND there needs to be a mailbox for bert set up on that server. HTH Warren Vail -Original Message- From: Michael Gale [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 7:26 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP mail redirect ?? Hello, I have been playing around with a web mail app called NOCC (http://nocc.sourceforge.net/) It has some nice features and is quick. I want to add in a redirect button for mail, there is a forward button but it forwards mail just like a regular client for ... as expected. But I want a redirect button so I could send the exact same message to the same user and from the same person just but to another mail box on a different machine. Is there a easy to do this with out having to create some thing from scratch. Thanks .. Michael. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php mail() sendmail hanging freebsd 4.10
When hitting php pages that use the mail() function, I get a 5 second hang in the browser. The mail is then being delivered fine. Many of the same scripts that use this mail function ran fine with ½ sec. or less delay on my old redhat box. Any ideas how to make it run quicker would be greatly appreciated. I've included the sendmail.mc and php.ini files below. Best, Thomas S. Crum # Sendmail .mc file divert(-1) divert(0) VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.10.2.19 2003/12/31 17:42:16 gshapiro Exp $') OSTYPE(freebsd4) DOMAIN(generic) FEATURE(access_db, `hash -o -TTMPF /etc/mail/access') FEATURE(blacklist_recipients) FEATURE(local_lmtp) FEATURE(mailertable, `hash -o /etc/mail/mailertable') FEATURE(virtusertable, `hash -o /etc/mail/virtusertable') FEATURE(use_cw_file) dnl set SASL options TRUST_AUTH_MECH(`GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN')dnl define(`confAUTH_MECHANISMS', `GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN')dnl define(`confDEF_AUTH_INFO', `/etc/mail/auth-info')dnl dnl Uncomment to allow relaying based on your MX records. dnl NOTE: This can allow sites to use your server as a backup MX without dnl your permission. dnl FEATURE(relay_based_on_MX) dnl DNS based black hole lists dnl dnl DNS based black hole lists come and go on a regular basis dnl so this file will not serve as a database of the available servers. dnl For that, visit dnl http://directory.google.com/Top/Computers/Internet/Abuse/Spam/Blacklists/ dnl Uncomment to activate Realtime Blackhole List dnl information available at http://www.mail-abuse.com/ dnl NOTE: This is a subscription service as of July 31, 2001 dnl FEATURE(dnsbl) dnl Alternatively, you can provide your own server and rejection message: dnl FEATURE(dnsbl, `blackholes.mail-abuse.org', `550 Mail from ${client_addr} rejected, see http://mail-abuse.org/cgi-bin/lookup?; ${client_addr}') dnl Dialup users should uncomment and define this appropriately dnl define(`SMART_HOST', `your.isp.mail.server') dnl Uncomment the first line to change the location of the default dnl /etc/mail/local-host-names and comment out the second line. dnl define(`confCW_FILE', `-o /etc/mail/sendmail.cw') define(`confCW_FILE', `-o /etc/mail/local-host-names') dnl Enable for both IPv4 and IPv6 (optional) DAEMON_OPTIONS(`Name=IPv4, Family=inet') dnl DAEMON_OPTIONS(`Name=IPv6, Family=inet6, Modifiers=O') define(`confBIND_OPTS', `WorkAroundBroken') define(`confNO_RCPT_ACTION', `add-to-undisclosed') define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy') MAILER(local) MAILER(smtp) # php.ini ; Language Options ; ; Enable the PHP scripting language engine under Apache. engine = On ; Allow the ? tag. Otherwise, only ?php and script tags are recognized. ; NOTE: Using short tags should be avoided when developing applications or ; libraries that are meant for redistribution, or deployment on PHP ; servers which are not under your control, because short tags may not ; be supported on the target server. For portable, redistributable code, ; be sure not to use short tags. short_open_tag = On ; Allow ASP-style % % tags. asp_tags = Off ; The number of significant digits displayed in floating point numbers. precision= 14 ; Enforce year 2000 compliance (will cause problems with non-compliant browsers) y2k_compliance = On ; Output buffering allows you to send header lines (including cookies) even ; after you send body content, at the price of slowing PHP's output layer a ; bit. You can enable output buffering during runtime by calling the output ; buffering functions. You can also enable output buffering for all files by ; setting this directive to On. If you wish to limit the size of the buffer ; to a certain size - you can use a maximum number of bytes instead of 'On', as ; a value for this directive (e.g., output_buffering=4096). output_buffering = 4096 ; You can redirect all of the output of your scripts to a function. For ; example, if you set output_handler to mb_output_handler, character ; encoding will be transparently converted to the specified encoding. ; Setting any output handler automatically turns on output buffering. ; Note: People who wrote portable scripts should not depend on this ini ; directive. Instead, explicitly set the output handler using ob_start(). ; Using this ini directive may cause problems unless you know what script ; is doing. ; Note: You cannot use both mb_output_handler with ob_iconv_handler ; and you cannot use both ob_gzhandler and zlib.output_compression. ;output_handler = ; Transparent output compression using the zlib library ; Valid values for this option are 'off', 'on', or a specific buffer size ; to be used for compression (default is 4KB) ; Note: Resulting chunk size may vary due to nature of compression. PHP ; outputs chunks that are few handreds bytes each as a result of compression. ; If you want larger chunk
Re: [PHP] php mail() error
Hello, On 11/14/2004 03:49 AM, Curt Zirzow wrote: Requiring authentication is one common solution to not leave relaying opened. Common but not the *only* way. That is irrelevant because most servers that issue the message above only allow relaying with prior authentication. FYI, the class that I suggested implements both SMTP and POP3 based authentication. Maybe if you try them you will realize that I am provide a plain simple solution for the problem of the original poster because it consists only in replacing the mail() calls to the smtp_mail() provided with these classes: you know we're going down the same road that took up to much of my time from the last time. You simply dont comprehend that your solution is *not* the only solution and take offence to that. No, I take offence when you label as spam the messages that I post suggesting solutions that solve the original poster problem. We are just on the same road from the last time because you are still being childish and acting imaturely trying to insult me on a public forum. You are only making a fool of yourself because you reveal that a) you are not providing any solution (sending people to go and figure what their problem is on Google is not a solution), b) you are underestimating my knowledge of many years about this subject. Sometimes I forget names. But then when I notice the pattern of labeling as spam my messages helping others in PHP mailing lists, some bells ring. This is the very first time i ever labeled your stuff as spam. It is not the first time you try to offend me and obstruct my attempts to help PHP users, that is the pattern. There aren't many people that get keep protesting against my messages of helping others with ready to use PHP components that I have developed for many years to solve problems like they present. I have no problem with your solutions, I've simply stated that it may not be the only solution. Basically you have no clue what the problem is. That is why your reply was to go and figure in Google. If you had a clue, you would realize that a) this is a frequently posed problem, b) the solution is that it requires authentication because that is the default configuration for Microsoft SMTP servers. You can suggest other solutions (which you didn't) but those require changing the SMTP server configuration, which is usually beyhond the users possibilities. -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() error
Hello, On 11/13/2004 04:08 AM, Curt Zirzow wrote: * Thus wrote Jason Wong: On Wednesday 10 November 2004 12:36, Garth Hapgood - Strickland wrote: But when I get the following error back.: Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] ... This is a VERY FAQ. googling the error message will tell you what it means. Searching the archives will give you some solutions. Or you can wait for Manuel Lemos' reply :) for some reason I find that very funny :) I also find it funny that you found it funny because in the end the original poster only got an useful reply from me! ;-) -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() error
Hello, On 11/14/2004 01:29 AM, Curt Zirzow wrote: But when I get the following error back.: Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] ... This is a VERY FAQ. googling the error message will tell you what it means. Searching the archives will give you some solutions. Or you can wait for Manuel Lemos' reply :) for some reason I find that very funny :) I also find it funny that you found it funny because in the end the original poster only got an useful reply from me! ;-) um. you may want to reread the whole thread. If you even paid attention to Jason's message a simple google search for: smtp 550 5.7.1 unable to rely for returns a bunch more information than spam. FYI, that is a common error message that SMTP servers return when they only allow relaying messages to remote addresses after prior authentication. This way the SMTP servers do not leave relaying opened to unauthorized users. SMTP servers opened to anybody for relaying usually end in a black list. Requiring authentication is one common solution to not leave relaying opened. If you really knew how SMTP servers work, you would have avoided making a fool of yourself with yet another personal attack against somebody that is offering a practical solution that solves the original poster problem. -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() error
* Thus wrote Manuel Lemos: Hello, On 11/14/2004 01:29 AM, Curt Zirzow wrote: If you even paid attention to Jason's message a simple google search for: smtp 550 5.7.1 unable to rely for returns a bunch more information than spam. FYI, that is a common error message that SMTP servers return when they only allow relaying messages to remote addresses after prior authentication. correct. prior authentication means you either authenticated via smtp or have access other ways.. pop relay, fall within a certain ip range.. etc... Requiring authentication is one common solution to not leave relaying opened. Common but not the *only* way. If you really knew how SMTP servers work, you would have avoided making a fool of yourself with yet another personal attack against somebody that is offering a practical solution that solves the original poster problem. my god.. you take it as a personal attack that I provide someone else an alternative method of finding out what there problem is? Curt -- Quoth the Raven, Nevermore. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() error
* Thus wrote Manuel Lemos: Hello, On 11/13/2004 04:08 AM, Curt Zirzow wrote: * Thus wrote Jason Wong: On Wednesday 10 November 2004 12:36, Garth Hapgood - Strickland wrote: But when I get the following error back.: Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] ... This is a VERY FAQ. googling the error message will tell you what it means. Searching the archives will give you some solutions. Or you can wait for Manuel Lemos' reply :) for some reason I find that very funny :) I also find it funny that you found it funny because in the end the original poster only got an useful reply from me! ;-) um. you may want to reread the whole thread. If you even paid attention to Jason's message a simple google search for: smtp 550 5.7.1 unable to rely for returns a bunch more information than spam. :sigh: Curt -- Quoth the Raven, Nevermore. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() error
Hello, On 11/14/2004 02:15 AM, Curt Zirzow wrote: If you even paid attention to Jason's message a simple google search for: smtp 550 5.7.1 unable to rely for returns a bunch more information than spam. FYI, that is a common error message that SMTP servers return when they only allow relaying messages to remote addresses after prior authentication. correct. prior authentication means you either authenticated via smtp or have access other ways.. pop relay, fall within a certain ip range.. etc... Requiring authentication is one common solution to not leave relaying opened. Common but not the *only* way. That is irrelevant because most servers that issue the message above only allow relaying with prior authentication. FYI, the class that I suggested implements both SMTP and POP3 based authentication. Maybe if you try them you will realize that I am provide a plain simple solution for the problem of the original poster because it consists only in replacing the mail() calls to the smtp_mail() provided with these classes: http://www.phpclasses.org/mimemessage http://www.phpclasses.org/smtpclass http://www.phpclasses.org/sasl If you really knew how SMTP servers work, you would have avoided making a fool of yourself with yet another personal attack against somebody that is offering a practical solution that solves the original poster problem. my god.. you take it as a personal attack that I provide someone else an alternative method of finding out what there problem is? Are you still trying to insult my intelligence? Sometimes I forget names. But then when I notice the pattern of labeling as spam my messages helping others in PHP mailing lists, some bells ring. There aren't many people that get keep protesting against my messages of helping others with ready to use PHP components that I have developed for many years to solve problems like they present. Then I remember that you are one of that elite of arrogant individuals that do not want me to help others proposing the use of my components because you belong to the anti-Manuel Lemos bandwagon as you declared yourself in the bottom of this message: http://news.php.net/php.general/190968 Although, I am almost used to people like yourself, it is always kind of surprising to see that how much certain people act as if I am threat to their existence in the PHP world. You ought to know me better in person to realize how pointless are your personal attacks against me. My lemma is that cooperating is better than competing. I do not have a problem if you really try to help others, with your components or whoever. I don't know why you have a problem when I try to help with my components!?! -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() error
* Thus wrote Manuel Lemos: Hello, On 11/14/2004 02:15 AM, Curt Zirzow wrote: If you even paid attention to Jason's message a simple google search for: smtp 550 5.7.1 unable to rely for returns a bunch more information than spam. FYI, that is a common error message that SMTP servers return when they only allow relaying messages to remote addresses after prior authentication. correct. prior authentication means you either authenticated via smtp or have access other ways.. pop relay, fall within a certain ip range.. etc... Requiring authentication is one common solution to not leave relaying opened. Common but not the *only* way. That is irrelevant because most servers that issue the message above only allow relaying with prior authentication. FYI, the class that I suggested implements both SMTP and POP3 based authentication. Maybe if you try them you will realize that I am provide a plain simple solution for the problem of the original poster because it consists only in replacing the mail() calls to the smtp_mail() provided with these classes: you know we're going down the same road that took up to much of my time from the last time. You simply dont comprehend that your solution is *not* the only solution and take offence to that. If you really knew how SMTP servers work, you would have avoided making a fool of yourself with yet another personal attack against somebody that is offering a practical solution that solves the original poster problem. my god.. you take it as a personal attack that I provide someone else an alternative method of finding out what there problem is? Are you still trying to insult my intelligence? no.. just trying to expand other people intelligence. Sometimes I forget names. But then when I notice the pattern of labeling as spam my messages helping others in PHP mailing lists, some bells ring. This is the very first time i ever labeled your stuff as spam. There aren't many people that get keep protesting against my messages of helping others with ready to use PHP components that I have developed for many years to solve problems like they present. I have no problem with your solutions, I've simply stated that it may not be the only solution. Then I remember that you are one of that elite of arrogant individuals that do not want me to help others proposing the use of my components because you belong to the anti-Manuel Lemos bandwagon as you declared yourself in the bottom of this message: http://news.php.net/php.general/190968 You're personal issues are none of my business, i simply povide alternatives. Dont forget you accused me of being a some sort of pear freak. Although, I am almost used to people like yourself, it is always kind of surprising to see that how much certain people act as if I am threat to their existence in the PHP world. hehe.. php world? I'm only here to help people. You ought to know me better in person to realize how pointless are your personal attacks against me. My lemma is that cooperating is better than competing. I do not have a problem if you really try to help others, with your components or whoever. I don't know why you have a problem when I try to help with my components!?! As I have said time and time again.. you can always provide your solutions that you've developed or have accessable to people.. but dont mislead them thinking that your solution is the *only* way. Curt -- Quoth the Raven, Nevermore. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() error
* Thus wrote Jason Wong: On Wednesday 10 November 2004 12:36, Garth Hapgood - Strickland wrote: But when I get the following error back.: Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] ... This is a VERY FAQ. googling the error message will tell you what it means. Searching the archives will give you some solutions. Or you can wait for Manuel Lemos' reply :) for some reason I find that very funny :) Curt -- Quoth the Raven, Nevermore. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php mail() error
Im using the php mail() function to try send an email to a user that has just registered. mail($HTTP_POST_VARS['emailaddress1'], 'Matchmakers Website Registration' , 'Welcome'); But when I get the following error back.: Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] Can someone help me out, by telling me what it means or what Im doing wrong? Thanx Garth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() error
On Wednesday 10 November 2004 12:36, Garth Hapgood - Strickland wrote: Im using the php mail() function to try send an email to a user that has just registered. mail($HTTP_POST_VARS['emailaddress1'], 'Matchmakers Website Registration' , 'Welcome'); But when I get the following error back.: Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] Can someone help me out, by telling me what it means or what Im doing wrong? This is a VERY FAQ. googling the error message will tell you what it means. Searching the archives will give you some solutions. Or you can wait for Manuel Lemos' reply :) -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* He who is content with his lot probably has a lot. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() error
On Wed, 10 Nov 2004 23:14:43 +, Jason Wong [EMAIL PROTECTED] wrote: Or you can wait for Manuel Lemos' reply :) Good one. :) -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail() error
Garth Hapgood - Strickland wrote: But when I get the following error back.: Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] Can someone help me out, by telling me what it means or what Im doing wrong? Your mail server is not set up to send mail from (or relay) for redpoint.co.za. Consult your mail server documentation for help (i.e. not a PHP issue). -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php mail() error
Hi, Problem is realted to your smtp server. Make sure it allowed outgoing mail without authenctication. You must also set a header in fourth parameter of mail function, it is good practice and can save you from some basic indentification problems. In windows you can set default send mail from in php.ini Try Mail([EMAIL PROTECTED],test subject,test body,from:[EMAIL PROTECTED]); If it fails contact your ISP. Additionally read http://www.chilkatsoft.com/faq/Smtp550.html Zareef ahmed -Original Message- From: Garth Hapgood - Strickland [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 10, 2004 6:06 PM To: [EMAIL PROTECTED] Subject: [PHP] php mail() error Im using the php mail() function to try send an email to a user that has just registered. mail($HTTP_POST_VARS['emailaddress1'], 'Matchmakers Website Registration' , 'Welcome'); But when I get the following error back.: Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] Can someone help me out, by telling me what it means or what Im doing wrong? Thanx Garth -- Zareef Ahmed :: A PHP develoepr in Delhi ( India ) Homepage :: http://www.zasaifi.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php mail() error
Hi, Well this time I will take the responsibility :) Here is the link about mail sending in PHP . http://www.phpclasses.org/browse/package/9.html Zareef ahmed -Original Message- From: Greg Donald [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 10, 2004 8:48 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] php mail() error On Wed, 10 Nov 2004 23:14:43 +, Jason Wong [EMAIL PROTECTED] wrote: Or you can wait for Manuel Lemos' reply :) Good one. :) -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- Zareef Ahmed :: A PHP develoepr in Delhi ( India ) Homepage :: http://www.zasaifi.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php mail help
I have php installed on my PC as well as an apache webserver and mysql. I am using cox.net as my cable internet provider. They block port 25 but I do not know if that affects what I am trying to do... which is: use the mail() function to send email for my user activation script. I am trying to test everything for my website on my computer before I pay for hosting. When I run the registration script I get this: Warning: mail(): sendmail_from not set in php.ini or custom From: header missing in C:\Program Files\Apache Group\Apache2\htdocs\campushotties\reghandle2.php on line 137 now the funny thing is i have the following code in my php.ini file: [mail function] ; For Win32 only. SMTP = smtp.east.cox.net smtp_port = 25 ; For Win32 only. sendmail_from = [EMAIL PROTECTED] from the error message one would think that the email would be delivered but with a bad From address field. However, nothing is delivered. I also tried switching the smtp_port to port 26.. that didnt work either. Thanks for any help, Pat
[PHP] php mail() scaleability
Using mail($to, $subject, $content, $headers) takes way too long when attempting to mail to 30k people. This seems to be a result of a socket being opened for each send. Is there a better way to approach this situation via php? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Mail handler?
Dear All Is there a mail function or object that I can use on my PHP sites that does the same as the CDONTS object in ASP? Where can I find some tutorials on this subject? Regards Jacques -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Mail handler?
[snip] Is there a mail function or object that I can use on my PHP sites that does the same as the CDONTS object in ASP? Where can I find some tutorials on this subject? [/snip] The manual works fine for most http://www.php.net/mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP mail() fonction - Slow? Alternative?
Hi all, I'm using the mail() fonction to send email and it takes 60 seconds to send a simple email. Maybe it's due to the sendmail configuration, or maybe not, I'm not really sure, 'cos I'm not a Linux expert. Anyway, I cannot take so long to send a simple mail with PHP, so I need to find a solution, another way to send a mail or the riht configuration for sendmail. I hope someone will be able to help me. Thanks, Stephane. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP mail() fonction - Slow? Alternative?
* Thus wrote Stéphane Paquay ([EMAIL PROTECTED]): Hi all, I'm using the mail() fonction to send email and it takes 60 seconds to send a simple email. Maybe it's due to the sendmail configuration, or maybe not, I'm not really sure, 'cos I'm not a Linux expert. The odds are pretty high that it is your sendmail configuration. Internally all php does is pass the information directly to sendmail. Unless you're bcc'ing 10 people it won't take that long for php. Anyway, I cannot take so long to send a simple mail with PHP, so I need to find a solution, another way to send a mail or the riht configuration for sendmail. sendmail can be a nightmare to configure, if you are concerned about speed, I might suggest finding a different mta like qmail or postfix. They are more secure and faster than the traditional sendmail. Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP mail function From header not working
When I try to use a php script, to send an email, the From header is replaced by a senders email address of my provider. Is there any way to make it so my email address shows up in the From header? In the script I used fake addresses, because of client privacy reasons... ? $email = [EMAIL PROTECTED]; $mailheaders = From: My Name\n; $mailheaders .= Reply-To: [EMAIL PROTECTED]\n\n; $message2 =MESSAGE GOES HERE; mail($email,TITLE,$message2,$mailheaders); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php mail confirmation
Hello all, I would like to ask how can I make registration confirmation by email...user will receive mail confirming his registration immediately after he registers in application.is it possible to make mail() function filled with data from registration (email)? -- Best regards, Martin mailto:corwin;corwin.sk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail confirmation
On Thursday 14 November 2002 17:02, Martin Hudec wrote: Hello all, I would like to ask how can I make registration confirmation by email...user will receive mail confirming his registration immediately after he registers in application. is it possible to make mail() function filled with data from registration (email)? Yes, well why not? Just build up the body of your mail using the info from your form ($_POST or $_GET) and pass it to mail(). -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* It's hard to get ivory in Africa, but in Alabama the Tuscaloosa. -- Groucho Marx */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail()
Ühel ilusal päeval [14-10-2002 22:46] kirjutas John W. Holmes: Hey do you guys know how to correct this problem with sending email? A custumer uses mail() to send the email and it isn't deliverable. So the message bounces. But since the local sendmail sent the email it thus bounces to root's mailbox instead of say the replyto address. Anyone know how to correct it so that it sends the bounces to the person sending it? This is on a virtual host machine with hundreds of domains. The users probably need to set a FROM header in their mail $header = FROM: [EMAIL PROTECTED]; mail($to,$subject,$body,$header); Then the bounce should go to that address. There are two different headers -- the From: header and the From header. Bounces go to the address specified in the From header. I believe you must reconfigure your MTA to send different From header, i don't think this can be set within PHP. Cheers, Juhan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php mail()
Hi list, I trying to send mail using PHP's mail() function without success. My email is rejected because it goes with apache@localhost. I've tried everything put a diferent from in header etc. Does anyone have a clue My system is a RedHAT 7, PHP4.2.3, sendmail thank's n advance -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php mail()
Hi list, I trying to send mail using PHP's mail() function without success. My email is rejected because it goes with apache@localhost. I've tried everything put a diferent from in header etc. Does anyone have a clue My system is a RedHAT 7, PHP4.2.3, sendmail thank's n advance Probably need to set a FROM header in your mail $header = FROM: [EMAIL PROTECTED]; mail($to,$subject,$body,$header); Or there is a setting in php.ini that sets this, too. Maybe try that, if you can. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php mail()
Hey do you guys know how to correct this problem with sending email? A custumer uses mail() to send the email and it isn't deliverable. So the message bounces. But since the local sendmail sent the email it thus bounces to root's mailbox instead of say the replyto address. Anyone know how to correct it so that it sends the bounces to the person sending it? This is on a virtual host machine with hundreds of domains. Thank you, --- Brad Dameron Network Account Executive TSCNet Inc. www.tscnet.com Silverdale, WA. 1-888-8TSCNET -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 12:17 PM To: 'Rodrigo Peres'; 'PHP' Subject: RE: [PHP] php mail() Hi list, I trying to send mail using PHP's mail() function without success. My email is rejected because it goes with apache@localhost. I've tried everything put a diferent from in header etc. Does anyone have a clue My system is a RedHAT 7, PHP4.2.3, sendmail thank's n advance Probably need to set a FROM header in your mail $header = FROM: [EMAIL PROTECTED]; mail($to,$subject,$body,$header); Or there is a setting in php.ini that sets this, too. Maybe try that, if you can. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php mail()
You'd have to make the user under which Apache runs a trusted user in Sendmail and then use the -f switch in the additional parameters section of the mail command. On Mon, 2002-10-14 at 15:44, Brad Dameron wrote: Hey do you guys know how to correct this problem with sending email? A custumer uses mail() to send the email and it isn't deliverable. So the message bounces. But since the local sendmail sent the email it thus bounces to root's mailbox instead of say the replyto address. Anyone know how to correct it so that it sends the bounces to the person sending it? This is on a virtual host machine with hundreds of domains. Thank you, --- Brad Dameron Network Account Executive TSCNet Inc. www.tscnet.com Silverdale, WA. 1-888-8TSCNET -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 12:17 PM To: 'Rodrigo Peres'; 'PHP' Subject: RE: [PHP] php mail() Hi list, I trying to send mail using PHP's mail() function without success. My email is rejected because it goes with apache@localhost. I've tried everything put a diferent from in header etc. Does anyone have a clue My system is a RedHAT 7, PHP4.2.3, sendmail thank's n advance Probably need to set a FROM header in your mail $header = FROM: [EMAIL PROTECTED]; mail($to,$subject,$body,$header); Or there is a setting in php.ini that sets this, too. Maybe try that, if you can. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php mail()
Hey do you guys know how to correct this problem with sending email? A custumer uses mail() to send the email and it isn't deliverable. So the message bounces. But since the local sendmail sent the email it thus bounces to root's mailbox instead of say the replyto address. Anyone know how to correct it so that it sends the bounces to the person sending it? This is on a virtual host machine with hundreds of domains. The users probably need to set a FROM header in their mail $header = FROM: [EMAIL PROTECTED]; mail($to,$subject,$body,$header); Then the bounce should go to that address. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php mail()
This is being done. And no that is not how sendmail works unfortunately. --- Brad Dameron Network Account Executive TSCNet Inc. www.tscnet.com Silverdale, WA. 1-888-8TSCNET -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 12:47 PM To: 'Brad Dameron'; 'PHP' Subject: RE: [PHP] php mail() Hey do you guys know how to correct this problem with sending email? A custumer uses mail() to send the email and it isn't deliverable. So the message bounces. But since the local sendmail sent the email it thus bounces to root's mailbox instead of say the replyto address. Anyone know how to correct it so that it sends the bounces to the person sending it? This is on a virtual host machine with hundreds of domains. The users probably need to set a FROM header in their mail $header = FROM: [EMAIL PROTECTED]; mail($to,$subject,$body,$header); Then the bounce should go to that address. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mail()
The additional_parameters parameter can be used to pass an additional parameter to the program configured to use when sending mail using the sendmail_path configuration setting. For example, this can be used to set the envelope sender address when using sendmail. You may need to add the user that your web server runs as to your sendmail configuration to prevent a 'X-Warning' header from being added to the message when you set the envelope sender using this method. Example 375. Sending mail with extra headers and setting an additional command line parameter. mail([EMAIL PROTECTED], the subject, $message, From: webmaster@$SERVER_NAME, -fwebmaster@$SERVER_NAME); from http://us.php.net/manual/en/function.mail.php Paul Roberts http://www.paul-roberts.com [EMAIL PROTECTED] - Original Message - From: Brad Dameron [EMAIL PROTECTED] To: 'PHP' [EMAIL PROTECTED] Sent: Monday, October 14, 2002 8:44 PM Subject: RE: [PHP] php mail() Hey do you guys know how to correct this problem with sending email? A custumer uses mail() to send the email and it isn't deliverable. So the message bounces. But since the local sendmail sent the email it thus bounces to root's mailbox instead of say the replyto address. Anyone know how to correct it so that it sends the bounces to the person sending it? This is on a virtual host machine with hundreds of domains. Thank you, --- Brad Dameron Network Account Executive TSCNet Inc. www.tscnet.com Silverdale, WA. 1-888-8TSCNET -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 12:17 PM To: 'Rodrigo Peres'; 'PHP' Subject: RE: [PHP] php mail() Hi list, I trying to send mail using PHP's mail() function without success. My email is rejected because it goes with apache@localhost. I've tried everything put a diferent from in header etc. Does anyone have a clue My system is a RedHAT 7, PHP4.2.3, sendmail thank's n advance Probably need to set a FROM header in your mail $header = FROM: [EMAIL PROTECTED]; mail($to,$subject,$body,$header); Or there is a setting in php.ini that sets this, too. Maybe try that, if you can. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - mail() function problem
Hi Jason, I have found out the mistake I did, the /usr/bin/sendmail that my MTA(XMAIL in this case) uses was not 'chmod +s' ed. Ans that is the reason when I ran the script in shell ( being logged in as root) it worked fine, and not thru apache. /chandu - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, August 17, 2002 11:49 PM Subject: Re: [PHP] PHP - mail() function problem On Saturday 17 August 2002 21:08, N. Pari Purna Chand wrote: Hi guys, I am facing a strange problem, php's mail() function is not working when a php page is executed thru apache, but the same page which has mail() function is working fine and is sending mails when php is used as a scripting language in shell. Is this on the same machine? If so, check that both the apache-php and the cgi-php are using the same php.ini (and hence same sendmail settings). Any guess what might be causing the problem ? Try comparing php.ini. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Heard that the next Space Shuttle is supposed to carry several Guernsey cows? It's gonna be the herd shot 'round the world. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - mail() function problem
Hi Jason, I have found out the mistake I did, the /usr/bin/sendmail that my MTA(XMAIL in this case) uses was not 'chmod +s' ed. Ans that is the reason when I ran the script in shell ( being logged in as root) it worked fine, and not thru apache. /chandu - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, August 17, 2002 11:49 PM Subject: Re: [PHP] PHP - mail() function problem On Saturday 17 August 2002 21:08, N. Pari Purna Chand wrote: Hi guys, I am facing a strange problem, php's mail() function is not working when a php page is executed thru apache, but the same page which has mail() function is working fine and is sending mails when php is used as a scripting language in shell. Is this on the same machine? If so, check that both the apache-php and the cgi-php are using the same php.ini (and hence same sendmail settings). Any guess what might be causing the problem ? Try comparing php.ini. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Heard that the next Space Shuttle is supposed to carry several Guernsey cows? It's gonna be the herd shot 'round the world. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP - mail() function problem
Hi guys, I am facing a strange problem, php's mail() function is not working when a php page is executed thru apache, but the same page which has mail() function is working fine and is sending mails when php is used as a scripting language in shell. I'm using xmail's sendmail and xmail as MTA on this machine. I've been using the same thing on another machine withour any problems. Both the machines are installed with mandrake 8.2 Any guess what might be causing the problem ? TIA /chandu -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php