[PHP] mail problem (newlines becomes =0A)
Forwarded. Accidentally clicked reply directly to Nitsan. Sorry about that. :-\ On Thu, Jun 19, 2008 at 2:47 AM, Nitsan Bin-Nun [EMAIL PROTECTED] wrote: Umm just for general knowledge, whats the difference between HEREDOC to simple value assignment? As far as i know they both do the same job except that HEREDOC have problems with tabs infront of it (at the first line). Ther are other distinctions? HEREDOC syntax has no problems with tabs anywhere except the termination mark. For example: ?php $text =EOT I can have tabs here, no problem. EOT; // I can't have a tab before this terminator though. ? About the only *real* problem you'll face with HEREDOC vs. multiline quotes is using name-keyed arrays and superglobals. For example, you can use $foo[0], but you can't use $foo['bar'] or $_SESSION['foobar']. -- /Daniel P. Brown Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract! Dedicated servers, VPS, and hosting from $2.50/mo. -- /Daniel P. Brown Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract! Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem (newlines becomes =0A)
Daniel Brown wrote: Forwarded. Accidentally clicked reply directly to Nitsan. Sorry about that. :-\ On Thu, Jun 19, 2008 at 2:47 AM, Nitsan Bin-Nun [EMAIL PROTECTED] wrote: Umm just for general knowledge, whats the difference between HEREDOC to simple value assignment? As far as i know they both do the same job except that HEREDOC have problems with tabs infront of it (at the first line). Ther are other distinctions? HEREDOC syntax has no problems with tabs anywhere except the termination mark. For example: ?php $text =EOT I can have tabs here, no problem. EOT; // I can't have a tab before this terminator though. ? About the only *real* problem you'll face with HEREDOC vs. multiline quotes is using name-keyed arrays and superglobals. For example, you can use $foo[0], but you can't use $foo['bar'] or $_SESSION['foobar']. umm If this didn't work, most of my HEREDOC sections would not work. AFAIK I have always been able to use name-keyed arrays in my HEREDOC. I have always wrapped them with {...} to allow PHP to better identify them, but they have always worked for me. plaintext?php $a = array(); $a[0]['first'] = 'jim'; $a[0]['last'] = 'lucas'; $a[1]['first'] = 'daniel'; $a[1]['last'] = 'brown'; foreach ( $a AS $person ) { echo OUT Your first name is {$person['first']}. Your last name is {$person['last']}. OUT; } ? -- /Daniel P. Brown Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract! Dedicated servers, VPS, and hosting from $2.50/mo. -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem (newlines becomes =0A)
Daniel Brown wrote: Forwarded. Accidentally clicked reply directly to Nitsan. Sorry about that. :-\ On Thu, Jun 19, 2008 at 2:47 AM, Nitsan Bin-Nun [EMAIL PROTECTED] wrote: Umm just for general knowledge, whats the difference between HEREDOC to simple value assignment? As far as i know they both do the same job except that HEREDOC have problems with tabs infront of it (at the first line). Ther are other distinctions? HEREDOC syntax has no problems with tabs anywhere except the termination mark. For example: ?php $text =EOT I can have tabs here, no problem. EOT; // I can't have a tab before this terminator though. ? About the only *real* problem you'll face with HEREDOC vs. multiline quotes is using name-keyed arrays and superglobals. For example, you can use $foo[0], but you can't use $foo['bar'] or $_SESSION['foobar']. -- /Daniel P. Brown Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract! Dedicated servers, VPS, and hosting from $2.50/mo. Sorry, forgot to send the link to my example in action http://www.cmsws.com/examples/php/testscripts/[EMAIL PROTECTED]/0001.php -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem (newlines becomes =0A)
On Thu, Jun 19, 2008 at 12:02 PM, Jim Lucas [EMAIL PROTECTED] wrote: umm If this didn't work, most of my HEREDOC sections would not work. AFAIK I have always been able to use name-keyed arrays in my HEREDOC. I have always wrapped them with {...} to allow PHP to better identify them, but they have always worked for me. I'm sorry, I half-explained what I meant. You're correct as usual, Jim. ;-) If you use named-key arrays plainly, they won't work, giving a parse error for T_ENCAPSED_AND_WHITESPACE. If you place them in curly brackets to evaluate them, they'll work as expected. Sometimes it's a pain in the general ass region to remember to explicitly explain something when you know what you mean. -- /Daniel P. Brown Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract! Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail problem (newlines becomes =0A)
Hi, When a member register in my site, I send him a mail with activation link. This is the string I send: $mailContent = Thank you for your interest in XYZ !\n\n . In order to activate your account, please click the link below.\n\n . (If the link . I tested on my gmail address, and the message appears well. However recently I had a member alerting me that the message was broken: Thank you for your interest in XYZ!=0A=0AIn order= to activate your account, please click the link below.=0A=0A(If the link Instead of new lines he gets =0A characters Message is hard to read and activation URL is broken. Anyone has an idea on how to solve this problem ? Thank you very much !! -- View this message in context: http://www.nabble.com/mail-problem-%28newlines-becomes-%3D0A%29-tp17993688p17993688.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem (newlines becomes =0A)
debussy007 wrote: Hi, When a member register in my site, I send him a mail with activation link. This is the string I send: $mailContent = Thank you for your interest in XYZ !\n\n . In order to activate your account, please click the link below.\n\n . (If the link . I tested on my gmail address, and the message appears well. However recently I had a member alerting me that the message was broken: Thank you for your interest in XYZ!=0A=0AIn order= to activate your account, please click the link below.=0A=0A(If the link Instead of new lines he gets =0A characters Message is hard to read and activation URL is broken. Anyone has an idea on how to solve this problem ? Thank you very much !! Change it to: $mailContent = Thank you for your interest in XYZ! In order to activate your account, please click the link below. (If the link . ; I've always used this and never had a problem with it. Wolf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem (newlines becomes =0A)
On Wed, Jun 18, 2008 at 7:14 PM, Wolf [EMAIL PROTECTED] wrote: Change it to: $mailContent = Thank you for your interest in XYZ! In order to activate your account, please click the link below. (If the link . ; I've always used this and never had a problem with it. If you want to do it that way, I'd recommend HEREDOC syntax. ?php $mailContent =EOM Thank you for your interest in XYZ! In order to activate your account, please click the link below. (If the link EOM; -- /Daniel P. Brown Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract! Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem - deadline!!!!!
On 8/7/07, Luc [EMAIL PROTECTED] wrote: Good evening list, i'm having a strange mail problem: i have 2 contact-forms on a site, where 1 get's send to the e-mail account and the other doesn't. I've tested them both on my remote server and they work, but when i upload them to the clients' server, 1 doesn't arrive in the mailbox and the other one does. Code for the troublesome form: code snip -- Best regards, Luc Hello Luc: Your code is really large, you should try narrow the problem down to a specific piece of code that doesn't work. You can start with setting error_reporting to E_ALL and see if it generates any warnings, fix them if so. If that didn't help, try to remove piece of code and see when it works, when it works again, add pieces of code 1 by 1 and see which one is causing trouble. Then take a deeper look at that part, and see if you can find the problem, if not, then you can come back to this list with that small piece of code. Tijnema -- Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail problem - deadline!!!!! - SOLVED
Good evening list, Solved the problem myself :-) i changed the mail function instead of $youremail = '[EMAIL PROTECTED]', i used $to = and changed the mail fuction from: @mail($contato_email,$subjectline,$body, From: $contato_email); into @mail($to,$subjectline,$body, From: $contato_email); -- Best regards, Luc Powered by The Bat! version 3.99.3 with Windows XP (build 2600), version 5.1 Service Pack 2 and using the best browser: Opera. From St Paul's second letter to the Corithians: 'Dear Corinthians, you could have at least replied to the first ...' - Giobbe Covatta - Italian writer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[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] Re: PHP mail() problem
Hello, on 03/20/2007 06:54 AM Delta Storm said the following: 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... ČĆŽŠĐ Several things are wrong. I think Croatian letters need ISO-8859-2 character set. utf-8 is fine too. Make sure you use the same encoding as you use for the HTML page where your form is. Other than that, you should not use 8bit content transfer encoding when you have non-ASCII characters in the text. You should use quoted-printable encoding for the body and q-encoding for the headers. You have multiple Content-Type headers. Only one is right. For messages with HTML, you should use only multipart/alternative. However the body must enclose both a text/plain and a text/html alternative parts. This is all a bit complicated to do with a small script like you have. It is much simpler to use ready to use components to do the hard work of message assembly for you. I use this MIME message class. It can handle all you need including non-ASCII character encoding. Take a look at the test_simple_html_mail_message.php example script. http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos Metastorage - Data object relational mapping layer generator http://www.metastorage.net/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail Problem
I have an issue with sending email via PHP which may be a configuration problem with either PHP, Apache, or possibly a Sendmail, but I don't know which yet. I figured I'd start here first. Here's the situation. I have several webpages that send email to users for various reasons. We have our webserver, an intranet webserver, configured to connect to our smtp server which sits on a different box. The script looks like this: ?PHP $from = [EMAIL PROTECTED]; $to = [EMAIL PROTECTED]; $subject = Test; $msg = This is a test from my site\n\nTimestamp: . date(r); $headers = From:$from\r\n; if(!mail($to,$subject,$msg,$headers)) { die(Unable to send); } ? This works great when it works. Users receive email as expected and when they hit reply it goes back to the webmaster email address. The problem is if the to email address isn't a valid one. When this happens, the mail server bounces the message back to [EMAIL PROTECTED] instead of [EMAIL PROTECTED] I've tried adding reply-to to the mail headers and that doesn't work either. We tried sending the same failed message using webmin and that worked great, which is why I believe this to be a PHP or Apache problem. Any ideas? Thanks, Robbert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Problem
Why not validate the email address before you send. I use something like this to kick back an error that says you put in a bad email address. It won't tell you about a wrong email address, but it will tell you if they forgot to put in the @ sign and stuff. if (!preg_match(/^(.+)@[a-zA-Z0-9-]+\.[a-zA-Z0-9.-]+$/si, $data)) { $email_error = yes; } -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326 On Sep 26, 2006, at 9:09 AM, [EMAIL PROTECTED] wrote: I have an issue with sending email via PHP which may be a configuration problem with either PHP, Apache, or possibly a Sendmail, but I don't know which yet. I figured I'd start here first. Here's the situation. I have several webpages that send email to users for various reasons. We have our webserver, an intranet webserver, configured to connect to our smtp server which sits on a different box. The script looks like this: ?PHP $from = [EMAIL PROTECTED]; $to = [EMAIL PROTECTED]; $subject = Test; $msg = This is a test from my site\n\nTimestamp: . date(r); $headers = From:$from\r\n; if(!mail($to,$subject,$msg,$headers)) { die(Unable to send); } ? This works great when it works. Users receive email as expected and when they hit reply it goes back to the webmaster email address. The problem is if the to email address isn't a valid one. When this happens, the mail server bounces the message back to [EMAIL PROTECTED] instead of [EMAIL PROTECTED] I've tried adding reply-to to the mail headers and that doesn't work either. We tried sending the same failed message using webmin and that worked great, which is why I believe this to be a PHP or Apache problem. Any ideas? Thanks, Robbert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Problem
I have an issue with sending email via PHP which may be a configuration problem with either PHP, Apache, or possibly a Sendmail, but I don't know which yet. I figured I'd start here first. Here's the situation. I have several webpages that send email to users for various reasons. We have our webserver, an intranet webserver, configured to connect to our smtp server which sits on a different box. The script looks like this: ?PHP $from = [EMAIL PROTECTED]; $to = [EMAIL PROTECTED]; $subject = Test; $msg = This is a test from my sitennTimestamp: . date(r); $headers = From:$fromrn; if(!mail($to,$subject,$msg,$headers)) { die(Unable to send); } ? This works great when it works. Users receive email as expected and when they hit reply it goes back to the webmaster email address. The problem is if the to email address isn't a valid one. When this happens, the mail server bounces the message back to [EMAIL PROTECTED] instead of [EMAIL PROTECTED] I've tried adding reply-to to the mail headers and that doesn't work either. We tried sending the same failed message using webmin and that worked great, which is why I believe this to be a PHP or Apache problem. Is it a UNIX box? Sendmail takes the -f parameter in your php.ini to configure its envelope from address... Does not extract it from message headers. The fifth argument to mail() also supports doing this if you need to change it on a per-mail basis. I would just set it in php.ini. (like: sendmail_path = '/usr/bin/sendmail -f [EMAIL PROTECTED]') If its a Win box there is a sendmail_from config param in php.ini. php.net/manual/function.mail.php read for 'Additional Params' the fifth argument, it specifically deals with this case. Travis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Problem
On Tue, September 26, 2006 11:09 am, [EMAIL PROTECTED] wrote: I have an issue with sending email via PHP which may be a configuration problem with either PHP, Apache, or possibly a Sendmail, but I don't know which yet. I figured I'd start here first. Here's the situation. I have several webpages that send email to users for various reasons. We have our webserver, an intranet webserver, configured to connect to our smtp server which sits on a different box. The script looks like this: ?PHP $from = [EMAIL PROTECTED]; $to = [EMAIL PROTECTED]; $subject = Test; $msg = This is a test from my site\n\nTimestamp: . date(r); $headers = From:$from\r\n; Add a space after the ':' to be kosher. Add a Reply-To: Add an Errors-to: (I think?) if(!mail($to,$subject,$msg,$headers)) { die(Unable to send); } *IF* you are using PHP5 (?) and *IF* your security settings allow it, the optional fifth argument will let you specify the real sender of the message, which the responder may or may not be using to bounce to. http://php.net/mail -- 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] Mail Problem
On Tue, September 26, 2006 11:16 am, Kevin Murphy wrote: Why not validate the email address before you send. I use something like this to kick back an error that says you put in a bad email address. It won't tell you about a wrong email address, but it will tell you if they forgot to put in the @ sign and stuff. if (!preg_match(/^(.+)@[a-zA-Z0-9-]+\.[a-zA-Z0-9.-]+$/si, $data)) { $email_error = yes; } Given that the *correct* PCRE expression for a valid email address is 3 pages long, the odds that yours is not rejecting some valid address seem rather slim to me. The . between the 9 and the - is not escaped, and renders the rest of the characters in that class superfluous. But let's suppose your PCRE actually proved the email syntactically valid. That's got *NOTHING* to do with the email generating a bounce or not! There are a zillion times as many syntactically valid emails as there are ones that don't bounce, never mind the even smaller class of email addresses that actually go somewhere, and the even smaller class of email addresses that a human reads on a regular basis. -- 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] Mail Problem
Richard Lynch wrote: if(!mail($to,$subject,$msg,$headers)) { die(Unable to send); } *IF* you are using PHP5 (?) and *IF* your security settings allow it, the optional fifth argument will let you specify the real sender of the message, which the responder may or may not be using to bounce to. http://php.net/mail Richard is correct on that. The fifth argument isn't only for the envelope sender, so ensure you include the '-f' for sendmail and compat. wrappers. php.net/mail: ChangeLog: 4.0.5 The additional_parameters parameter was added. ... which the responder may or may not be using to bounce to. They should *always* be sending to the envelope from address (SMTP `MAIL FROM` command), with an empty envelope sender (SMTP `MAIL FROM:`) to avoid loops. The RFC's are a rather in depth, so here is an excerpt from Wikipedia that pretty much sums up what the RFCs do contain: [http://en.wikipedia.org/wiki/Bounce_message] The Return-Path is visible in delivered mail as header field Return-Path inserted by the final SMTP mail transfer agent http://en.wikipedia.org/wiki/Mail_transfer_agent (MTA), also known as mail delivery agent http://en.wikipedia.org/wiki/Mail_delivery_agent (MDA). The MDA simply copies the *reverse path* in the SMTP MAIL FROM command into the Return-Path. The MDA also removes bogus Return-Path header fields inserted by other MTAs, this header field is generally guaranteed to reflect the last reverse path seen in the MAIL FROM command. Travis Doherty -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Problem
On Tue, September 26, 2006 5:08 pm, Travis Doherty wrote: They should *always* be sending to the envelope from address (SMTP `MAIL FROM` command), with an empty envelope sender (SMTP `MAIL FROM:`) to avoid loops. There was a brief period in time where there was an Errors-to: header that some MTAs where using... I got no idea if they were just ignoring RFCs (Microsoft) or the RFCs changed or what... But adding the Errors-to: header may solve things for a tiny percentage of legacy (broken) MTAs. YMMV -- 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] Mail Problem
On Tue, September 26, 2006 5:08 pm, Travis Doherty wrote: The RFC's are a rather in depth, so here is an excerpt from Wikipedia that pretty much sums up what the RFCs do contain: [http://en.wikipedia.org/wiki/Bounce_message] For awhile, I've been pondering the advisability of sending a Bounce for some spam -- the ones where I think it's a more or less honorable company, with some idiots running it, and I want off their list, and other actions have so far failed. So, if I code a PHP IMAP app to let me send a Bounce for one message, is that going to screw my because some MTA will cache that Bounce status and start bouncing other mail?... Yeah, okay, the question is sorta off-topic, but it will get coded in PHP if it's safe to do so... -- 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] Mail Problem
On 9/26/06, Richard Lynch [EMAIL PROTECTED] wrote: On Tue, September 26, 2006 11:09 am, [EMAIL PROTECTED] wrote: I have an issue with sending email via PHP which may be a configuration problem with either PHP, Apache, or possibly a Sendmail, but I don't know which yet. I figured I'd start here first. Here's the situation. I have several webpages that send email to users for various reasons. We have our webserver, an intranet webserver, configured to connect to our smtp server which sits on a different box. The script looks like this: ?PHP $from = [EMAIL PROTECTED]; $to = [EMAIL PROTECTED]; $subject = Test; $msg = This is a test from my site\n\nTimestamp: . date(r); $headers = From:$from\r\n; Add a space after the ':' to be kosher. ::cough::rfc compliant::cough::) Add a Reply-To: Add an Errors-to: (I think?) Yeah these can help in finding out the problem, the Errors-To: header is usually used when the original message can't be delivered, if the server handling the message supports it will send to that header instead of the envelope addressee. The Reply-To, is more for the client software, iirc. if(!mail($to,$subject,$msg,$headers)) { die(Unable to send); } *IF* you are using PHP5 (?) and *IF* your security settings allow it, the optional fifth argument will let you specify the real sender of the message, which the responder may or may not be using to bounce to. php4 allows the '5th' param as well, but the safe_mode paramater does affect if you are able to use this. Curt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail Problem
On a side note.. have i ever mentioned the email system really sucks. Curt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem
Chris wrote: check your SMTP settings in the PHP.ini file. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail problem
Hi, I upgraded to apache 2.2 and php5, now all my mail() functions return false. But there is nothing in the logs as to why it failed. sendmail is in the path. Has something else changed that won't let mail() run? Thanks. No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/252 - Release Date: 2/6/2006 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem
I also noticed there is no /usr/local/lib/php/Mail directory anymore, should there be with php5? - Original Message - From: PHP To: php Sent: Monday, February 06, 2006 10:35 AM Subject: [PHP] mail problem Hi, I upgraded to apache 2.2 and php5, now all my mail() functions return false. But there is nothing in the logs as to why it failed. sendmail is in the path. Has something else changed that won't let mail() run? Thanks. No virus found in this outgoing message.Checked by AVG Free Edition.Version: 7.1.375 / Virus Database: 267.15.2/252 - Release Date: 2/6/2006 -- PHP General Mailing List (http://www.php.net/)To unsubscribe, visit: http://www.php.net/unsub.php No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/252 - Release Date: 2/6/2006 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem
Hi, Is there a /usr/sbin/sendmail file on the server? php looks for this when it compiles, if it's not there then mail() won't work. (check a phpinfo page as well and look for sendmail_path). PHP wrote: I also noticed there is no /usr/local/lib/php/Mail directory anymore, should there be with php5? - Original Message - *From:* PHP mailto:[EMAIL PROTECTED] *To:* php mailto:php-general@lists.php.net *Sent:* Monday, February 06, 2006 10:35 AM *Subject:* [PHP] mail problem Hi, I upgraded to apache 2.2 and php5, now all my mail() functions return false. But there is nothing in the logs as to why it failed. sendmail is in the path. Has something else changed that won't let mail() run? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() Problem
Hi. I am very new to this group and this is my first request for help so please be patient. when I try to use the mail() function in a PHP based webpage I get the following error: Fatal error: Call to undefined function: mail() in the path to my script on line line number I have tried changing some mail config details in php.ini. For instance, the path to sendmail used to be: /usr/lib and I have changed it to: /usr/lib/sendmail -t -i. The permissions on sendmail are 555, owner is root and group is other. I guess you could say I am well and truly clutching at straws now!! Has anyone else ever had this problem? If so how was it resolved? Mary-Anne -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() Problem
Mary-Anne Nayler wrote: Hi. I am very new to this group and this is my first request for help so please be patient. when I try to use the mail() function in a PHP based webpage I get the following error: Fatal error: Call to undefined function: mail() in the path to my script on line line number I have tried changing some mail config details in php.ini. For instance, the path to sendmail used to be: /usr/lib and I have changed it to: /usr/lib/sendmail -t -i. The permissions on sendmail are 555, owner is root and group is other. I guess you could say I am well and truly clutching at straws now!! Has anyone else ever had this problem? If so how was it resolved? Mary-Anne Mary - This error occours when PHP can't find sendmail at compile-time. Your best bet would be to install sendmail or a sendmail-compatible MTA, and then rebuild PHP. Postfix is my second love, so naturally I'd recommend it - www.postfix.org. Thanks -dant -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() Problem
On Mon, May 9, 2005 4:02 pm, Mary-Anne Nayler said: Fatal error: Call to undefined function: mail() in the path to my script on line line number That means PHP has no mail() function to even call, which is MUCH earlier in the process than sendmail location. Most likely, your webhost has decided that to stop spammers and runaway mail abuse, he'd just rip out the mail() function from PHP. You may be able to bypass this by using one of the mail classes at http://phpclasses.org to talk directly to an SMTP server not under that webhost control. So, this time, it's actually NOT about paths/permissions on sendmail. :-) -- 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] mail problem
I get the following mail problem when trying to send from localhost. Any ideas? Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] in c:\Inetpub\wwwroot\ssn\adv_mail.php on line 179 R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem
It probably means your email server is not setup for open relaying (aka spam server). Mail servers should require a login in order to send email through them. The mail() function itself doesn't support names and passwords, but other php functions do. You might want to look into phpmailer to handle you email needs. Alternatively, you could setup your email server to allow open relaying from the localhost. But that's not really recommended even if you know exactly what you are doing with the mail server configuration. On Apr 29, 2005, at 3:27 AM, Ross wrote: I get the following mail problem when trying to send from localhost. Any ideas? Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] in c:\Inetpub\wwwroot\ssn\adv_mail.php on line 179 R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Brent Baisley Systems Architect Landover Associates, Inc. Search Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail problem with PEAR
Hi, i want to send an email with an attached file using PEAR classes. I succeed to do it with one recipients and more. I use an external SMTP to send it. My problem is that when i want to send an email with for example 4 recipients and 1 attached file, the mail is send 4 times to the SMTP server. Is it possible to use PEAR mail function to send it 1 time to SMTP server and after that SMTP server send it to the 4 recipients ? thx for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail problem with PEAR
On , 2005-04-12 at 12:15 +0200, marc serra wrote: Hi, i want to send an email with an attached file using PEAR classes. I succeed to do it with one recipients and more. I use an external SMTP to send it. My problem is that when i want to send an email with for example 4 recipients and 1 attached file, the mail is send 4 times to the SMTP server. Is it possible to use PEAR mail function to send it 1 time to SMTP server and after that SMTP server send it to the 4 recipients ? Yes, set mail headers for CC and BCC. I'm not very familiar with PEAR's package for sending mail, but I'm more than sure that it has feature to set headers. Looking at the manual ( www.php.net/mail ) would be also an excellent idea, since there are this kind of code examples. Hope this helps, Josip Dzolonga http://josip.dotgeek.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem at interland
On Friday 28 January 2005 16:32, Jason Wong wrote: On Friday 28 January 2005 10:09, David Edwards wrote: I have a fairly simple script written that uses the mail() function on a client site hosted at Interland. I have used a similar script quite a few times before with no problem. However although the script generates no errors, no emails appear at their intended destination. Interland support has not been that helpful and they did suggest I try the '-f' option in the header. That did not work either. Has anyone seen this before, I am running out of ideas. The mail portion of the script is below: $headers .= MIME-Version: 1.0\n; $headers .= Content-type: text/plain; charset=iso-8859-1\n; $headers .= X-Priority: 1\n; $headers .= X-MSMail-Priority: High\n; $headers .= X-Mailer: php\n; $headers .= From: $emailfrom\n; $mailsent = mail($emailto, $subject, $msg, $headers,-f . $emailfrom); 1) Use the proper delimiters between headers -- \r\n 2) Check your mailserver logs 3) The From address may cause the mesage to be rejected if it does not have the same domain as the mailserver. Cheers -- David Robley Even the Holodeck women turn me down: Wesley -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem at interland
Hi David, On Thu, January 27, 2005 9:09 pm, David Edwards said: Hi, $headers .= MIME-Version: 1.0\n; $headers .= Content-type: text/plain; charset=iso-8859-1\n; $headers .= X-Priority: 1\n; $headers .= X-MSMail-Priority: High\n; $headers .= X-Mailer: php\n; $headers .= From: $emailfrom\n; I believe the headers have to end with a blank line? If I remeber correctly, the last line in the $headers should have two new lines like $headers .= From: $emailfrom\n\n; HTH -R'twick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem at interland
On Friday 28 January 2005 10:54, R'twick Niceorgaw wrote: I believe the headers have to end with a blank line? If I remeber correctly, the last line in the $headers should have two new lines like $headers .= From: $emailfrom\n\n; No, the mail() function will automatically take care of the separation of the mail headers and the mail body. -- 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 -- New Year Resolution: Ignore top posted posts -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem at interland
R'twick Niceorgaw wrote: Hi David, On Thu, January 27, 2005 9:09 pm, David Edwards said: Hi, $headers .= MIME-Version: 1.0\n; $headers .= Content-type: text/plain; charset=iso-8859-1\n; $headers .= X-Priority: 1\n; $headers .= X-MSMail-Priority: High\n; $headers .= X-Mailer: php\n; $headers .= From: $emailfrom\n; I believe the headers have to end with a blank line? If I remeber correctly, the last line in the $headers should have two new lines like $headers .= From: $emailfrom\n\n; mail() will take care of that. You might want to use \r\n instead of just \n, as that's what it's technically supposed to be -- Though I think it works just fine on Un*x-like boxes to use just \n... You might want to add Reply-to: as well as From with the same setting to keep more email clients happy. -- 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] mail problem at interland
Hi, I have a fairly simple script written that uses the mail() function on a client site hosted at Interland. I have used a similar script quite a few times before with no problem. However although the script generates no errors, no emails appear at their intended destination. Interland support has not been that helpful and they did suggest I try the '-f' option in the header. That did not work either. Has anyone seen this before, I am running out of ideas. The mail portion of the script is below: $headers .= MIME-Version: 1.0\n; $headers .= Content-type: text/plain; charset=iso-8859-1\n; $headers .= X-Priority: 1\n; $headers .= X-MSMail-Priority: High\n; $headers .= X-Mailer: php\n; $headers .= From: $emailfrom\n; $mailsent = mail($emailto, $subject, $msg, $headers,-f . $emailfrom); Any help would be MUCH appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem at interland
On Friday 28 January 2005 10:09, David Edwards wrote: I have a fairly simple script written that uses the mail() function on a client site hosted at Interland. I have used a similar script quite a few times before with no problem. However although the script generates no errors, no emails appear at their intended destination. Interland support has not been that helpful and they did suggest I try the '-f' option in the header. That did not work either. Has anyone seen this before, I am running out of ideas. The mail portion of the script is below: $headers .= MIME-Version: 1.0\n; $headers .= Content-type: text/plain; charset=iso-8859-1\n; $headers .= X-Priority: 1\n; $headers .= X-MSMail-Priority: High\n; $headers .= X-Mailer: php\n; $headers .= From: $emailfrom\n; $mailsent = mail($emailto, $subject, $msg, $headers,-f . $emailfrom); 1) Use the proper delimiters between headers -- \r\n 2) Check your mailserver logs -- 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 -- New Year Resolution: Ignore top posted posts -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() problem
Hi All I use sample code from PHPFreaks i.e. mail($email_address, $subject, $message, From: realcorp.net Webmaster[EMAIL PROTECTED]\nX-Mailer: PHP/ . phpversion()); When the e-mail address is [EMAIL PROTECTED] (hosted by my telco/isp) it works. When I try [EMAIL PROTECTED] (via godaddy) it does not? If I send e-mails to those two addresses, using Outlook, they both work? Please feel free to try and register here. http://realwebonline.myftp.org/mc/register.php so that I can see if it works with other e-mail addresses. I did look this up in the manual - but I am still baffled. Thx Johan van Zyl JVZ Systems CC Box 3469 Somerset West 7129 [EMAIL PROTECTED] http://www.jvz.co.za +27 (0)82 875 4238 +27 (0)21 851 7205 Fax 088 021 852 2387 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.799 / Virus Database: 543 - Release Date: 2004/11/19 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() problem
Johan van Zyl wrote: Hi All I use sample code from PHPFreaks i.e. mail($email_address, $subject, $message, From: realcorp.net Webmaster[EMAIL PROTECTED]\nX-Mailer: PHP/ . phpversion()); When the e-mail address is [EMAIL PROTECTED] (hosted by my telco/isp) it works. When I try [EMAIL PROTECTED] (via godaddy) it does not? If I send e-mails to those two addresses, using Outlook, they both work? Please feel free to try and register here. http://realwebonline.myftp.org/mc/register.php so that I can see if it works with other e-mail addresses. I did look this up in the manual - but I am still baffled. Thx Is @jvz.co.za hosted on the same network as the web-server? Seems to be a problem with relaying on the mail-server. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem
You should also be using $_POST instead of $HTTP_POST_VARS. $_POST is a superglobal, so you can use it anywehere, it's shorter ;-), and it's the official way to access post vars. On Sun, 11 Jul 2004 08:52:54 +0800, Jason Wong [EMAIL PROTECTED] wrote: On Sunday 11 July 2004 08:33, Joao Gomes wrote: I am a beginner in php and I am trying to send emails from my machinne, I dont have any mail server installed in my computer (e.g. sendmail), btw i am running Windows XP, i wrote this script: [snip] and changed the php.ini to: [mail function] ; For Win32 only. SMTP = [EMAIL PROTECTED] SMTP (ie SMTP server) should be of the form: xxx.domain.tld, ie you should not have smtp@ in there. -- 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 -- /* Death is God's way of telling you not to be such a wise guy. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php !DSPAM:40f08d67207261637984098! -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem
Jason, et al: Is it not true that $HTTP_POST_VARS is more secure than $_POST, even though the latter is a superglobal? Doesn't the former acount for un-updated server versions? If it isn't, what disadvantage is there to using $HTTP_POST_VARS? Why should one use $_POST instead? (P.S.: Aidan Lister, this may be a dumb question, but please don't bother responding.) [Original Message] From: Justin Patrin [EMAIL PROTECTED] To: Jason Wong [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Date: 07/11/2004 12:29:24 AM Subject: Re: [PHP] mail problem You should also be using $_POST instead of $HTTP_POST_VARS. $_POST is a superglobal, so you can use it anywehere, it's shorter ;-), and it's the official way to access post vars. On Sun, 11 Jul 2004 08:52:54 +0800, Jason Wong [EMAIL PROTECTED] wrote: On Sunday 11 July 2004 08:33, Joao Gomes wrote: I am a beginner in php and I am trying to send emails from my machinne, I dont have any mail server installed in my computer (e.g. sendmail), btw i am running Windows XP, i wrote this script: [snip] and changed the php.ini to: [mail function] ; For Win32 only. SMTP = [EMAIL PROTECTED] SMTP (ie SMTP server) should be of the form: xxx.domain.tld, ie you should not have smtp@ in there. -- 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 -- /* Death is God's way of telling you not to be such a wise guy. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php !DSPAM:40f08d67207261637984098! -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- 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] mail problem
Is it not true that $HTTP_POST_VARS is more secure than $_POST, even though the latter is a superglobal? Doesn't the former acount for un-updated server versions? If it isn't, what disadvantage is there to using $HTTP_POST_VARS? Why should one use $_POST instead? No, $HTTP_xxx is not more secure. Please read http://php.net/variables.predefined If you're working on a server which is older than PHP4.1.0, then you'll have to use the older $HTTP stuff. If not, you're encouraged to use the newer superglobal form. The $HTTP stuff is disabled by default in PHP5. In terms of backward compatability I'd still advise you to use the newer form, there are very few hosts that still run php4.1.0 (because it has many dangerous bugs). (P.S.: Aidan Lister, this may be a dumb question, but please don't bother responding.) Please, you asked a stupid question and got done for it - let's put the past behind us. Hope this helps. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail problem
Hi, I am a beginner in php and I am trying to send emails from my machinne, I dont have any mail server installed in my computer (e.g. sendmail), btw i am running Windows XP, i wrote this script: ? $name=$HTTP_POST_VARS['name']; $email=$HTTP_POST_VARS['email']; $feedback=$HTTP_POST_VARS['feedback']; $toaddress = '[EMAIL PROTECTED]'; $subject = 'Feedback from web site'; $mailcontent = 'Customer name: '.$name.\n 'Customer email: '.$email.\n Customer comments: \n.$feedback.\n; $fromaddress = 'From: [EMAIL PROTECTED]'; mail($toaddress, $subject, $mailcontent, $fromaddress); ? and changed the php.ini to: [mail function] ; For Win32 only. SMTP = [EMAIL PROTECTED] smtp_port = 25 ; For Win32 only. sendmail_from = [EMAIL PROTECTED] Why it doesnt work? I am really lost here... if some nice-php-coder could help me I would really appreciate. thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem
On Sunday 11 July 2004 08:33, Joao Gomes wrote: I am a beginner in php and I am trying to send emails from my machinne, I dont have any mail server installed in my computer (e.g. sendmail), btw i am running Windows XP, i wrote this script: [snip] and changed the php.ini to: [mail function] ; For Win32 only. SMTP = [EMAIL PROTECTED] SMTP (ie SMTP server) should be of the form: xxx.domain.tld, ie you should not have smtp@ in there. -- 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 -- /* Death is God's way of telling you not to be such a wise guy. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() problem
Hi All, Does anyone know a good format for sending email using the mail() function that doesnt get stopped by antispam software? I need to send and email from my sever when a new member creates an account, this ive done but my email gets binned straight away? must be the headers? Regards Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() problem
Sounds like a problem for the maintainers of the spam blocking software? You can't correct the problem with the headers if you don't know what the spam software is objecting to. It may be objecting to the fact that the source is 127.0.0.1? -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 02, 2004 8:35 PM To: [EMAIL PROTECTED] Subject: [PHP] mail() problem Hi All, Does anyone know a good format for sending email using the mail() function that doesnt get stopped by antispam software? I need to send and email from my sever when a new member creates an account, this ive done but my email gets binned straight away? must be the headers? Regards Rick -- 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] Mail problem
All, Many thanks for you thoughts, I will take a look at your suggestions, I hope they fix the issue, others suggested the same things so I think we can assume your all correct, (I hope so!) Once again, thanks Trevor Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Trevor Dowling ([EMAIL PROTECTED]): PHP Version 4.3.2 I am having problems sending a large number of emails from a mail list held in a database. I don't belive that the database has anything to do with the problem. I have about 9000 addresses and can only successfully send about 2000 mails before the page say complete/done. see set_time_limit(). http://php.net/set_time_limit Also the webserver will disconnect after a certain amount of time, you can search the archives to see how people resolved this in the past. while (odbc_fetch_row ($result)) { $EmailAddress = trim (odbc_result ($result, 'email')); flush(); flush isn't necessary here, doesn't have anything to do with your issue though. oh, and also add a few lines that say: if(preg_match('[EMAIL PROTECTED]', $EmailAddress) ) { continue; } @mail ($EmailAddress, Support, $Message); HTH, 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
Re: [PHP] Mail problem
Fixed! Thanks Trevor Trevor Dowling [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] All, Many thanks for you thoughts, I will take a look at your suggestions, I hope they fix the issue, others suggested the same things so I think we can assume your all correct, (I hope so!) Once again, thanks Trevor Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Trevor Dowling ([EMAIL PROTECTED]): PHP Version 4.3.2 I am having problems sending a large number of emails from a mail list held in a database. I don't belive that the database has anything to do with the problem. I have about 9000 addresses and can only successfully send about 2000 mails before the page say complete/done. see set_time_limit(). http://php.net/set_time_limit Also the webserver will disconnect after a certain amount of time, you can search the archives to see how people resolved this in the past. while (odbc_fetch_row ($result)) { $EmailAddress = trim (odbc_result ($result, 'email')); flush(); flush isn't necessary here, doesn't have anything to do with your issue though. oh, and also add a few lines that say: if(preg_match('[EMAIL PROTECTED]', $EmailAddress) ) { continue; } @mail ($EmailAddress, Support, $Message); HTH, 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] Mail problem
PHP Version 4.3.2 I am having problems sending a large number of emails from a mail list held in a database. I don't belive that the database has anything to do with the problem. I have about 9000 addresses and can only successfully send about 2000 mails before the page say complete/done. Below is the code that I am running, no error messages are returned from the mail function, it just stops. About 2000 mails are sent OK. Anyone know what the problem is? Trevor $query_string = SELECT DISTINCT email FROM [user]; $result = odbc_exec ($odbc_connection, $query_string); $Message = Mail Text; $Index = 0; while (odbc_fetch_row ($result)) { $EmailAddress = trim (odbc_result ($result, 'email')); flush(); @mail ($EmailAddress, Support, $Message); $Index++; echo (BREmail Address: $EmailAddress); // DEBUG echo (BRErrorCode: ${ErrorCode}); // DEBUG echo (.${Index}); // DEBUG } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail problem
[snip] I have about 9000 addresses and can only successfully send about 2000 mails before the page say complete/done. [/snip] What is your PHP script execution time set to in the php.ini? Are you running this from the browser? If so you will also need to modify your browser timeout? Place this set_time_limit(0); at the top of your mail script if you are running from the command line. http://www.php.net/set_time_limit -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail problem
Have you timed it? You might want to check it doesn't take longer than the max_execution_time directive in php.ini allows (you'll have to check if that's the correct name for it). I've also used set_time_limit(0) at the top of my scripts when I know it's going to take a while... Regards Chris -Original Message- From: Trevor Dowling [mailto:[EMAIL PROTECTED] Sent: 22 September 2003 16:46 To: [EMAIL PROTECTED] Subject: [PHP] Mail problem PHP Version 4.3.2 I am having problems sending a large number of emails from a mail list held in a database. I don't belive that the database has anything to do with the problem. I have about 9000 addresses and can only successfully send about 2000 mails before the page say complete/done. Below is the code that I am running, no error messages are returned from the mail function, it just stops. About 2000 mails are sent OK. Anyone know what the problem is? Trevor $query_string = SELECT DISTINCT email FROM [user]; $result = odbc_exec ($odbc_connection, $query_string); $Message = Mail Text; $Index = 0; while (odbc_fetch_row ($result)) { $EmailAddress = trim (odbc_result ($result, 'email')); flush(); @mail ($EmailAddress, Support, $Message); $Index++; echo (BREmail Address: $EmailAddress); // DEBUG echo (BRErrorCode: ${ErrorCode}); // DEBUG echo (.${Index}); // DEBUG } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php If you are not the intended recipient of this e-mail, please preserve the confidentiality of it and advise the sender immediately of any error in transmission. Any disclosure, copying, distribution or action taken, or omitted to be taken, by an unauthorised recipient in reliance upon the contents of this e-mail is prohibited. Somerfield cannot accept liability for any damage which you may sustain as a result of software viruses so please carry out your own virus checks before opening an attachment. In replying to this e-mail you are granting the right for that reply to be forwarded to any other individual within the business and also to be read by others. Any views expressed by an individual within this message do not necessarily reflect the views of Somerfield. Somerfield reserves the right to intercept, monitor and record communications for lawful business purposes. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail problem
[snip] I have about 9000 addresses and can only successfully send about 2000 mails before the page say complete/done. [/snip] Depending on your error reporting level, instead of ending normally you should get a script timed out message. If you're not getting that message, it may be that your script is really only trying to send out 2000 emails. Are you using some kind of database query to get the email addresses? If so, check how many rows are being returned. -- Rob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail problem
* Thus wrote Trevor Dowling ([EMAIL PROTECTED]): PHP Version 4.3.2 I am having problems sending a large number of emails from a mail list held in a database. I don't belive that the database has anything to do with the problem. I have about 9000 addresses and can only successfully send about 2000 mails before the page say complete/done. see set_time_limit(). http://php.net/set_time_limit Also the webserver will disconnect after a certain amount of time, you can search the archives to see how people resolved this in the past. while (odbc_fetch_row ($result)) { $EmailAddress = trim (odbc_result ($result, 'email')); flush(); flush isn't necessary here, doesn't have anything to do with your issue though. oh, and also add a few lines that say: if(preg_match('[EMAIL PROTECTED]', $EmailAddress) ) { continue; } @mail ($EmailAddress, Support, $Message); HTH, 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
Re: [PHP] Mail() Problem Sending
/var/log/maillog file shold have some clues. Cesar Aracena wrote: Before trying to guess what Saddam can and can't do with computers, try sending e-mails to different addresses (different domains... NOT just different usernames). Sometimes, the e-mail server you use is NOT configured properly, so every e-mail does not gets to you. It happened to me too when testing my server's sendmail. The e-mails reached well one of my addresses but not another one. So I pointed the e-mails to a Hotmail account and it reached it. Try it and see what happens. For some e-mail servers, you have to write lots of extra headers in the e-mails in order to pass their guard. HTH Cesar Aracena www.icaam.com.ar -Mensaje original- De: Ben C. [mailto:[EMAIL PROTECTED] Enviado el: Lunes, 18 de Agosto de 2003 06:28 p.m. Para: [EMAIL PROTECTED] Asunto: [PHP] Mail() Problem Sending I have recently had php installed on my server with sendmail. The server is behind a firewall and SMTP is open on the firewall. However, when I execute the mail(), it appears to have sent the mail, but I never receive it. I am not getting any error messages. Has anyone ever run into this problem? Does anyone have any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Raditha Dissanayake - http://www.radinks.com/sftp/ Lean and mean Secure FTP applet with Graphical User Inteface. just 150 Kilo Bytes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail() Problem Sending
Cesar Aracena [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] For some e-mail servers, you have to write lots of extra headers in the e-mails in order to pass their guard. [/snip] True! But actually, I' ve seen people using only the 'From:' header to send mail. Emails can then be dropped easily by servers thinking it is spam. Ben, I don't know what headers you send, but you could try these headers: $headers = MIME-Version: 1.0\r\n; $headers .= Content-Type: text/plain; charset=iso-8859-1\r\n; $headers .= X-Priority: 3\r\n; $headers .= X-MSMail-Priority: Normal\r\n; $headers .= X-Mailer: PHP/.phpversion().\r\n; $headers .= From: Name [EMAIL PROTECTED]\r\n; $headers .= Reply-to: Name [EMAIL PROTECTED]\r\n; $headers .= Return-path: Name [EMAIL PROTECTED]\r\n; $headers .= Error-to: Name [EMAIL PROTECTED]\r\n; mail(Yourname [EMAIL PROTECTED], Subject, $body, $headers); HTH, Ivo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail() Problem Sending
* Thus wrote Ivo Fokkema ([EMAIL PROTECTED]): Cesar Aracena [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] For some e-mail servers, you have to write lots of extra headers in the e-mails in order to pass their guard. [/snip] True! But actually, I' ve seen people using only the 'From:' header to send mail. Emails can then be dropped easily by servers thinking it is spam. No email server should drop mail. Ben, I don't know what headers you send, but you could try these headers: $headers .= Return-path: Name [EMAIL PROTECTED]\r\n; Sending this header is virtually a waste of time and effort, it will be ignored and set by the receiving smtp server, and on the very fist line. $headers .= Error-to: Name [EMAIL PROTECTED]\r\n; This wont guarantee errors to return to that email address. 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
Re: [PHP] Mail() Problem Sending
Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Ivo Fokkema ([EMAIL PROTECTED]): True! But actually, I' ve seen people using only the 'From:' header to send mail. Emails can then be dropped easily by servers thinking it is spam. No email server should drop mail. Yet they seem to do...? Maybe dropped is not the right word? Clients may not receive emails which lack certain headers, as these emails are regarded spam by certain ISP's. Some people never even get 'normal' Outlook emails which are BCC'ed to them. The cause? Beats me... Somewhere, something, blocks/drops/deletes these emails... Ben, I don't know what headers you send, but you could try these headers: $headers .= Return-path: Name [EMAIL PROTECTED]\r\n; Sending this header is virtually a waste of time and effort, it will be ignored and set by the receiving smtp server, and on the very fist line. Hmmm... I ofcourse noticed that if I don't use -f in the 5th mail argument, return-path is something trashy like [EMAIL PROTECTED] Well, then I delete that from my list... $headers .= Error-to: Name [EMAIL PROTECTED]\r\n; This wont guarantee errors to return to that email address. No sh*t, I _never_ get bounced emails back although I set the reply-to and error-to headers. Someone told me some SMTP's use this header so I took my chances. -- Ivo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail() Problem Sending
I have recently had php installed on my server with sendmail. The server is behind a firewall and SMTP is open on the firewall. However, when I execute the mail(), it appears to have sent the mail, but I never receive it. I am not getting any error messages. Has anyone ever run into this problem? Does anyone have any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail() Problem Sending
My ideas: (in order of likelihood) Idea #1: Your computer hates you. Idea #2: Sendmail isn't running. Idea #3: Sendmail isn't setup correctly. Idea #4: You have been hacked by Saddam. -Michael :-) Ben C. wrote: I have recently had php installed on my server with sendmail. The server is behind a firewall and SMTP is open on the firewall. However, when I execute the mail(), it appears to have sent the mail, but I never receive it. I am not getting any error messages. Has anyone ever run into this problem? Does anyone have any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail() Problem Sending
Before trying to guess what Saddam can and can't do with computers, try sending e-mails to different addresses (different domains... NOT just different usernames). Sometimes, the e-mail server you use is NOT configured properly, so every e-mail does not gets to you. It happened to me too when testing my server's sendmail. The e-mails reached well one of my addresses but not another one. So I pointed the e-mails to a Hotmail account and it reached it. Try it and see what happens. For some e-mail servers, you have to write lots of extra headers in the e-mails in order to pass their guard. HTH Cesar Aracena www.icaam.com.ar -Mensaje original- De: Ben C. [mailto:[EMAIL PROTECTED] Enviado el: Lunes, 18 de Agosto de 2003 06:28 p.m. Para: [EMAIL PROTECTED] Asunto: [PHP] Mail() Problem Sending I have recently had php installed on my server with sendmail. The server is behind a firewall and SMTP is open on the firewall. However, when I execute the mail(), it appears to have sent the mail, but I never receive it. I am not getting any error messages. Has anyone ever run into this problem? Does anyone have any ideas? -- 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] mail problem
Hi, i have to send some e-mails with pictures, in html format, i was wondering if anyone knows where to find a php class that dose this. Thanks, Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail() problem
Hi Don, ?php $cmd='/bin/sh -c set'; passthru($cmd); echo 'P'; putenv(REMOTE_ADDR=$REMOTE_ADDR); passthru($cmd); echo 'P'; ? This code will work, but I want to be able to enforce it on people that use the mail() function. I want php to call sendmail (The one from php.ini that is) WITH this environment variabele still set. Maybe my initial post wasn't that clear on this :) Don Read [EMAIL PROTECTED] Kind regards, Maikel Verheijen.
Re: [PHP] Mail() problem
On 10-Jun-2003 Maikel Verheijen wrote: snip Unfortunately php does NOT pass on these environment variabeles to the program that gets called as the mail-program (In my case my mini-sendmail). This renders this little spamfinder trick unusable, which is too bad :( If someone has a clue/trick for me on how to enable this, I would be really gratefull! ?php $cmd='/bin/sh -c set'; passthru($cmd); echo 'P'; putenv(REMOTE_ADDR=$REMOTE_ADDR); passthru($cmd); echo 'P'; ? --- output wrapped: HOME=/ PS1='$ ' OPTIND=1 PS2=' ' PPID=2612 PATH=/sbin:/bin:/usr/sbin:/usr/bin IFS=' ' REMOTE_ADDR=127.0.0.2 HOME=/ PS1='$ ' OPTIND=1 PS2=' ' PPID=2614 PATH=/sbin:/bin:/usr/sbin:/usr/bin IFS=' ' Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail() problem
Hi list, Has anyone ever tried to use REMOTE_ADDR to be sent along with emails sent from php-scripts that use the mail() function? I have built a small auto-relaying sendmail (crudely based on mini-sendmail, http://www.acme.com/software/mini_sendmail/) that adds a received header containing the poster's ip-address. Unfortunately php does NOT pass on these environment variabeles to the program that gets called as the mail-program (In my case my mini-sendmail). This renders this little spamfinder trick unusable, which is too bad :( If someone has a clue/trick for me on how to enable this, I would be really gratefull! Kind regards, Maikel Verheijen.
[PHP] mail() problem affecting output to browser on completion
Alright with the following code I am using is printing/echoing to the browser a 1 before the html output. It's like it's adding 2 variables together. Here is what I am trying to do. I have a form that enters information to a text file, and at the same time sends the information to a predetermined email address. This email example is one that I made up on my server, but will work for this example. I need it to stop printing the number 1 before the rest of the page's output. $address = [EMAIL PROTECTED]; $subject = Your Feedback Page has been submitted\n; $body = The following is the information that was entered.br\r\n; $body .= Message Type: $messageTypebr\r\n; $body .= Subject: $subjectbodybr\r\n; $body .= Other Subject: $otherSubjectbr\r\n; $body .= Comments: $commentsbr\r\n; $body .= User Name: $usernamebr\r\n; $body .= Email Address: $emailbr\r\n; $body .= Telephone Number: $telephonebr\r\n; $body .= Fax Number: $faxbr\r\n; $body .= Contact Option: $contactbr\r\n; $moreheaders = From: [EMAIL PROTECTED]: text/html\n; $send = mail($address, $subject, $body, $moreheaders); echo $send; I noticed that the 1 is being entered in right as I call the Print command or in this case echo (I have tried using 'print $send' aswell). Knowing this doesn't solve my issue as all the echo/print command does in general is to start referencing my variables from earlier within the same script. Also if you need the whole script I can send that aswell. The part right here is what's bugging me,because if I take this out of the script, it works fine, just doesn't send an email but it still writes to the text fine and then displays without the 1, the problem is somewhere in this script section. I'm assuming, hehe Any help would be much appreciated. Thanks in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() problem affecting output to browser on completion
Alright with the following code I am using is printing/echoing to the browser a 1 before the html output. It's like it's adding 2 variables together. Here is what I am trying to do. I have a form that enters information to a text file, and at the same time sends the information to a predetermined email address. This email example is one that I made up on my server, but will work for this example. I need it to stop printing the number 1 before the rest of the page's output. $address = [EMAIL PROTECTED]; $subject = Your Feedback Page has been submitted\n; $body = The following is the information that was entered.br\r\n; $body .= Message Type: $messageTypebr\r\n; $body .= Subject: $subjectbodybr\r\n; $body .= Other Subject: $otherSubjectbr\r\n; $body .= Comments: $commentsbr\r\n; $body .= User Name: $usernamebr\r\n; $body .= Email Address: $emailbr\r\n; $body .= Telephone Number: $telephonebr\r\n; $body .= Fax Number: $faxbr\r\n; $body .= Contact Option: $contactbr\r\n; $moreheaders = From: [EMAIL PROTECTED]: text/html\n; $send = mail($address, $subject, $body, $moreheaders); echo $send; Why are you echoing $send? If mail() succeeds, it returns 1 (TRUE), which is assigned to $send, which you then print. The script is doing exactly what you tell it to do. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail problem
I don't believe you can use the form of Someone [EMAIL PROTECTED]. I believe this is what the MTA receives as the MAIL TO (not to be confused with eth To: header), and it's not a legal format for that. --- Rosen [EMAIL PROTECTED] wrote: Hi, I'm using PHP 4.3.1 on Win98 and I have a problem with sending E-mail with CC: header. I use following code: *--- $to=[EMAIL PROTECTED]; $message=sometext...; $subject=somesubject; $headers = MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; $headers .= From: Somebody [EMAIL PROTECTED]\r\n; $headers .= Cc: Support [EMAIL PROTECTED]\r\n; mail($to, $subject, $message, $headers); -- The problem is in the Cc: Support [EMAIL PROTECTED]\r\n. If I write it Cc: [EMAIL PROTECTED] - i.e. only E-mail adress without Support ..mailadress - it works. Can someone tell me where is the problem ? Thanks, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() problem
i setting php.ini [mail function] ;For Win32 only SMTP = hermes.ica.gov.co sendmail_from = [EMAIL PROTECTED] i invoke mail($to,$subject,$body,$headers); if $to is [EMAIL PROTECTED] is perfect. if $to is user@otherdomain generate error the problem is when the content $to is different at ica.gov.co eg. [EMAIL PROTECTED] function mail dont'n response. can help me? Carlos Alberto Pinto Hurtado IT ICA (57 1) 2322181 (57 1) 2324698 Movil.(57 3) 310 6184251 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() problem
Carlos Alberto Pinto Hurtado wrote: mail($to,$subject,$body,$headers); if $to is [EMAIL PROTECTED] is perfect. if $to is user@otherdomain generate error the problem is when the content $to is different at ica.gov.co eg. [EMAIL PROTECTED] function mail dont'n response. Carlos, This has to be a smtp mailer problem on hermes.ica.gov.co . Is the computer that php is running on setup to send email as a normal user (e.g. using Outlook)? If so, trying to send an email from Outlook to outside your domain will also fail, proving that it is the setup of hermes.ica.gov.co that is not allowing the email to be sent. HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() problem
Carlos Alberto Pinto Hurtado wrote: SMTP = hermes.ica.gov.co I forgot to add, look at the mail log on the above computer. It should show the attempt to send the email. If so, then it is another confirmation that your php is OK and it is the email server. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() problem
i setting php.ini [mail function] ;For Win32 only SMTP = hermes.ica.gov.co sendmail_from = [EMAIL PROTECTED] =it is impressive to see that the Greeks' messenger has made it all the way over to Colombia! Wasn't he also held responsible for dealing with people who were guilty of indiscreet speech - good name for an email server... =I'm immediately suspicious of the sub-domain address for the SMTP server. What do you have for server identification in your email package? Make the two definitions the same. =Whereas this might be the name of your MS-Exchange box, what happens if you remove the hermes. and just go with the domain name? =Regards, =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() problem...
Hi, i wrote a helpdesk script, which can send the user emails, if requested. The helpdesk sends emails as [EMAIL PROTECTED], but some servers don't accept nobody as the sender! do you know how i can change that? i don't mean the From: header, but the real sender header of the email... e.g.: Received: from nobody by hostname.mydomain.com with local (Exim .. Would i have to change the apache user to change this? I mean, there are so many scripts out there and they all have a proper Received: from... header, so i guess i simply overlooked s.th. Thanks for your help, Duncan . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() problem...
This header is added by mail server, so you must change the apache user. Duncan wrote: Hi, i wrote a helpdesk script, which can send the user emails, if requested. The helpdesk sends emails as [EMAIL PROTECTED], but some servers don't accept nobody as the sender! do you know how i can change that? i don't mean the From: header, but the real sender header of the email... e.g.: Received: from nobody by hostname.mydomain.com with local (Exim .. Would i have to change the apache user to change this? I mean, there are so many scripts out there and they all have a proper Received: from... header, so i guess i simply overlooked s.th. Thanks for your help, Duncan . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() problem...
Hi, The helpdesk sends emails as [EMAIL PROTECTED], but some servers don't accept nobody as the sender! do you know how i can change that? i don't mean the From: header, but the real sender header of the email... I don't know if this is a good way to do things or not, but I have scripts that send mail as several different addresses, and I do it this way: mail('user@wherever', 'Test', 'Test', 'From: [EMAIL PROTECTED]', '[EMAIL PROTECTED]'); (Outlook may screw that line up a bit, and if it does, I apologize). Sara Keesler -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() problem...
Oh, i see. Thanks. Marek Kilimajer wrote: This header is added by mail server, so you must change the apache user. Duncan wrote: Hi, i wrote a helpdesk script, which can send the user emails, if requested. The helpdesk sends emails as [EMAIL PROTECTED], but some servers don't accept nobody as the sender! do you know how i can change that? i don't mean the From: header, but the real sender header of the email... e.g.: Received: from nobody by hostname.mydomain.com with local (Exim .. Would i have to change the apache user to change this? I mean, there are so many scripts out there and they all have a proper Received: from... header, so i guess i simply overlooked s.th. Thanks for your help, Duncan . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail problem Sendmail 8.12.4
I am trying to get PHP to send mail through my FreeBSD machine and my machine is running Sendmail 8.12.4, and I have the path to sendmail in my /usr/local/lib/php.ini. I am using PHP 4.2.3 but it fails to send mail. My /var/log/maillog shows the attempt but nothing happens: Oct 8 11:12:18 stardust sendmail[84142]: g98HCIsQ084142: from=nobody, size=331, class=0, nrcpts=0, msgid=[EMAIL PROTECTED], relay=nobody@localhost Any ideas about what could be going on here? Devin Atencio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem Sendmail 8.12.4
In your sendmail path, do you have -t -i appended to the path? Like: /usr/bin/sendmail -t -i Adam Voigt [EMAIL PROTECTED] On Tue, 2002-10-08 at 13:15, Devin Atencio wrote: I am trying to get PHP to send mail through my FreeBSD machine and my machine is running Sendmail 8.12.4, and I have the path to sendmail in my /usr/local/lib/php.ini. I am using PHP 4.2.3 but it fails to send mail. My /var/log/maillog shows the attempt but nothing happens: Oct 8 11:12:18 stardust sendmail[84142]: g98HCIsQ084142: from=nobody, size=331, class=0, nrcpts=0, msgid=[EMAIL PROTECTED], relay=nobody@localhost Any ideas about what could be going on here? Devin Atencio -- 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] mail problem Sendmail 8.12.4
Yes I do have -t -i at the end of the path but it still doesn't work. Any other ideas? On Tue, 2002-10-08 at 11:17, Adam Voigt wrote: In your sendmail path, do you have -t -i appended to the path? Like: /usr/bin/sendmail -t -i Adam Voigt [EMAIL PROTECTED] On Tue, 2002-10-08 at 13:15, Devin Atencio wrote: I am trying to get PHP to send mail through my FreeBSD machine and my machine is running Sendmail 8.12.4, and I have the path to sendmail in my /usr/local/lib/php.ini. I am using PHP 4.2.3 but it fails to send mail. My /var/log/maillog shows the attempt but nothing happens: Oct 8 11:12:18 stardust sendmail[84142]: g98HCIsQ084142: from=nobody, size=331, class=0, nrcpts=0, msgid=[EMAIL PROTECTED], relay=nobody@localhost Any ideas about what could be going on here? Devin Atencio -- 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] mail problem Sendmail 8.12.4
Devin Atencio wrote: to sendmail in my /usr/local/lib/php.ini. I am using PHP 4.2.3 but it fails to send mail. My /var/log/maillog shows the attempt but nothing happens: Oct 8 11:12:18 stardust sendmail[84142]: g98HCIsQ084142: from=nobody, size=331, class=0, nrcpts=0, msgid=[EMAIL PROTECTED], relay=nobody@localhost Can an ordinary user send email? It sounds from the nobody@localhost as though it may not be configured. The From address may need to be a real user. HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail problem with more than 1k users
Hello. I wrote a PHP script that will pull records from a database (emails) and then mail something to the emails in the result set. Pretty simple and it worked. Now that the database has over 1 thousand records I began to experience performance problems. I figured that my problem was that Sendmail does not process emails that have more than x number of emails. So I re-designed the script to send emails in parts. 500 emails per header. But after the database reached more than 3,000 records the emailing did not work at all. Sendmail refused to send to any of the emails in the database result set. Any thoughts? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail problem with more than 1k users
I've had no problems using qmail-inject and MySQL to send over 100K emails in a day. I doubt it's an MySQL problem unless you've done something drastically wrong; perhaps you're bandwidth limited? -Original Message- From: Research and Development [mailto:[EMAIL PROTECTED]] Hello. I wrote a PHP script that will pull records from a database (emails) and then mail something to the emails in the result set. Pretty simple and it worked. Now that the database has over 1 thousand records I began to experience performance problems. I figured that my problem was that Sendmail does not process emails that have more than x number of emails. So I re-designed the script to send emails in parts. 500 emails per header. But after the database reached more than 3,000 records the emailing did not work at all. Sendmail refused to send to any of the emails in the database result set. Any thoughts? -- 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] Mail problem with more than 1k users
I suggest you get a mailing list program if your sending to more than 1k of users Philip - Original Message - From: Justin French [EMAIL PROTECTED] To: Research and Development [EMAIL PROTECTED]; PHP General List [EMAIL PROTECTED] Sent: Tuesday, September 24, 2002 1:57 PM Subject: Re: [PHP] Mail problem with more than 1k users This gets discussed quite frequently. My guess is that your ISP *may* be imposing some limitations, but more likely your PHP script is timing out or something similar. Justin on 24/09/02 9:08 AM, Research and Development ([EMAIL PROTECTED]) wrote: Hello. I wrote a PHP script that will pull records from a database (emails) and then mail something to the emails in the result set. Pretty simple and it worked. Now that the database has over 1 thousand records I began to experience performance problems. I figured that my problem was that Sendmail does not process emails that have more than x number of emails. So I re-designed the script to send emails in parts. 500 emails per header. But after the database reached more than 3,000 records the emailing did not work at all. Sendmail refused to send to any of the emails in the database result set. Any thoughts? -- 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] Mail problem with more than 1k users
I started dealing with this several years ago using Perl. The closest I got with sendmail was to check that the call worked, and if it didn't try again up to 5 times. For me, bottom line, if you want to do what you are trying to do, use something besides sendmail. I switched to Qmail, and have successfully sent 15,000+ personalized messages, one at a time, with both Perl and PHP. (It takes a couple hours, but it does work.) Of course I only send opt in email, and I hope you are doing the same, as spam is always evil. :) HTH, Peter Janett New Media One Web Services New Upgrades Are Now Live!!! Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1 Sun Solaris (UNIX) accounts - PHP 4.1.2, mod_perl/1.25, Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43 PostgreSQL coming soon! http://www.newmediaone.net [EMAIL PROTECTED] (303)828-9882 - Original Message - From: Justin French [EMAIL PROTECTED] To: Research and Development [EMAIL PROTECTED]; PHP General List [EMAIL PROTECTED] Sent: Monday, September 23, 2002 7:57 PM Subject: Re: [PHP] Mail problem with more than 1k users This gets discussed quite frequently. My guess is that your ISP *may* be imposing some limitations, but more likely your PHP script is timing out or something similar. Justin on 24/09/02 9:08 AM, Research and Development ([EMAIL PROTECTED]) wrote: Hello. I wrote a PHP script that will pull records from a database (emails) and then mail something to the emails in the result set. Pretty simple and it worked. Now that the database has over 1 thousand records I began to experience performance problems. I figured that my problem was that Sendmail does not process emails that have more than x number of emails. So I re-designed the script to send emails in parts. 500 emails per header. But after the database reached more than 3,000 records the emailing did not work at all. Sendmail refused to send to any of the emails in the database result set. Any thoughts? -- 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] Mail problem
The script below works on my development web server which sits on our company LAN. When I transfer the script to our isp hosted webserver, the script does not work. I changed 192.168.10.9/iarnaweb/ to read localhost/ for the isp webserver version (I have also tried replacing localhost with the actual ip address). On my development server, the email is sent and the redirection happens but on the production server neither of these happens. Any ideas? ?PHP $toaddress = [EMAIL PROTECTED]; $subject = Enquiry via Web Site.; $mailcontent = Customer Name: .$name.\n .Position: .$position.\n .Company Name: .$company.\n .Address: .$address.\n .E-mail: .$email.\n .Tel No: .$telno.\n .Customer Comments: .$enquiry.\n; mail($toaddress, $subject, $mailcontent); header(Location: http://192.168.10.9/iarnaweb/contactack.html;); ? This e-mail is intended for the recipient only and may contain confidential information. If you are not the intended recipient then you should reply to the sender and take no further ation based upon the content of the message. Internet e-mails are not necessarily secure and CCM Limited does not accept any responsibility for changes made to this message. Although checks have been made to ensure this message and any attchments are free from viruses the recipient should ensure that this is the case. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() problem
Hi again, ok i found out now, that the problem is the From: ... Reply-To: header. Whenever i leave those, the email gets delivered instantly, but included, the email gets a delivery delay for about 3 hours. Is there any other way, i can avoid getting the default email address as the sender, but a selected one? Regards, Duncan
Re: [PHP] mail() problem
Hi again, ok, i found the (weird!) problem now: Its not my server nor my ISP, but php (at least, i think so): Here are the exact lines i used in my test script: 1st non working - delayed example: mail($receiver,-Subject-,Here are your account details:\n\nusername: $lp_name\npassword: .base64_decode($lp_pass).\n\nYou can login now at: http://domain.com$PHP_SELF,From: [EMAIL PROTECTED]\r\nReply-To: [EMAIL PROTECTED]\r\n); 2nd working - non delayed example: $message = Here are your account details:\n\nusername: $lp_name\npassword: .base64_decode($lp_pass).\n\nYou can login now at: http://domain.com$PHP_SELF;; mail($receiver,-Subject-,$message,From: [EMAIL PROTECTED]\r\nReply-To: [EMAIL PROTECTED]\r\n); This is rather strange, because all i did was changing the email-message text into a variable and pass it to the mail() function, instead of including the whole string directly in it. But fact is, now it works just perfect without any delay! Does anyone have an idea, what may cause example #1 not to be delivered instantly? Or is my string in a bad-programming style? ...but then it shouldn't work as a variable either, right? I am completely lost in this case, Regards, Duncan
[PHP] mail() problem
Hi, i am currently having some problems with the mail() function, because emails don't get send, or if they do, they arrive with a huge delay. (~ 5% of mail() sent emails arrive) This only happens, if i try to email s.o. outside my network. Does anyone have an idea, what might cause this problem? Could it be the ISP, or do i need to add additional info, when i call the mail() function in order to send emails outside my network? This is what i used to test if the emails get sent or not: ? mail([EMAIL PROTECTED],test-subject,Test-content,From: [EMAIL PROTECTED]\r\n.Reply-To:[EMAIL PROTECTED]\r\n); ? Regards, Duncan
Re: [PHP] mail() problem
Does anyone have an idea, what might cause this problem? Could it be the ISP, or do i need to add additional info, when i call the mail() function in order to send emails outside my network? Could be your ISP... This is what i used to test if the emails get sent or not: ? mail([EMAIL PROTECTED],test-subject,Test-content,From: [EMAIL PROTECTED]\r\n.Reply-To:[EMAIL PROTECTED]\r\n); ? Mail from [EMAIL PROTECTED] may be your problem, if the ISP is doing sender address verification (which is more than likely the case). Try sending the mail from a valid exisiting email address, and see if that may help you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() problem
you miss understood what I was saying. I said to have your hotmail account setup as the return email address and then send mail to you ISP. if the mail bounces it will be returned to your hotmail account instead of your ISP. if you do receive the mail returned to your hotmail account. it should give you some insight on what is going on with the error messages included in the return mail. Jim Lucas - Original Message - From: César L. Aracena [EMAIL PROTECTED] To: PHP General List [EMAIL PROTECTED] Sent: Wednesday, June 05, 2002 8:42 PM Subject: RE: [PHP] mail() problem Ok. I've done everything that all of you told me to do, but still can't get to send e-mails to my ISP's mail address. I did all of the following: a) Append a Reply-To: [EMAIL PROTECTED] (Actually, it's [EMAIL PROTECTED] ) b) Send the e-mail to my Hotmail account, but everything seems fine. The address shown at the From: line is even the one I used in the Script. c) Because I have placed the Script into a server and not a local machine, asked the sysadmin to check the php.ini file and so but nothing. This step is crucial for my scripting and because all of my clients live here, most of them use the same ISP and have to get their e-mails. Actually, I didn't know how to change the content-type for my e-mail in order to do some testing. Can anyone help me with this? Might be my last chance... Thanks in advance, mailto:[EMAIL PROTECTED] César Aracena IS / MCSE+I Neuquén, NQN (0299) 156-356688 (0299) 446-6621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() problem
Hi all, I have this strange problem where I can send e-mails from a PHP script to a common e-mail address such as Hotmail's, but I can't send to my ISP-given e-mail address (@infovia.com.ar). Does anyone happen to know why is it that makes it different??? Thanks, Cesar Aracena [EMAIL PROTECTED] Neuquen, Argentina
Re: [PHP] mail() problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then César L. Aracena declared I have this strange problem where I can send e-mails from a PHP script to a common e-mail address such as Hotmail's, but I can't send to my ISP-given e-mail address (@infovia.com.ar). Does anyone happen to know why is it that makes it different??? Yes. I had something similar. Try putting 'Reply-To: [EMAIL PROTECTED]' in the fourth argument for mail. For some reason some systems balk without a reply address, I'm not certain why? - -- Nick Wilson // www.tioka.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8/kDMHpvrrTa6L5oRAu6BAJ9NSHXU3PBaEqJp3dBFK2XapByivACfQypM 5H9KkD+BXFoeYF3kV59K2MI= =XGSQ -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() problem
Cesar: What's the exact error message you are getting? or there's no error message? Are you running the PHP script in a local machine or a server? What MTA are you using? Regards, Ivan --- César_L._Aracena [EMAIL PROTECTED] wrote: Hi all, I have this strange problem where I can send e-mails from a PHP script to a common e-mail address such as Hotmail's, but I can't send to my ISP-given e-mail address (@infovia.com.ar). Does anyone happen to know why is it that makes it different??? Thanks, Cesar Aracena [EMAIL PROTECTED] Neuquen, Argentina __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() problem
you might want to test with a hotmail account as the return email address and find out if they are bouncing your email. I had this problem once, and in the return email it told me that I had miss formed headers. I got an error 550 from the mail server. you might try setting in the headers of you mail that you are sending, a) the content type, b) bit number 8bit, 7 bit, etc... that solved the problem for me. Jim Lucas - Original Message - From: César L. Aracena [EMAIL PROTECTED] To: PHP General List [EMAIL PROTECTED] Sent: Wednesday, June 05, 2002 9:29 AM Subject: [PHP] mail() problem Hi all, I have this strange problem where I can send e-mails from a PHP script to a common e-mail address such as Hotmail's, but I can't send to my ISP-given e-mail address (@infovia.com.ar). Does anyone happen to know why is it that makes it different??? Thanks, Cesar Aracena [EMAIL PROTECTED] Neuquen, Argentina -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() problem
Yes. I had something similar. Try putting 'Reply-To: [EMAIL PROTECTED]' in the fourth argument for mail. For some reason some systems balk without a reply address, I'm not certain why? I questioned my ISP on that. They had something in their sendmail.exe which prevented outgoing mail (scripts using smtp) that did not have a from: or reply-to: - something to do with stopping clients from spamming without correctly identifying themselves. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() problem
Ok. I've done everything that all of you told me to do, but still can't get to send e-mails to my ISP's mail address. I did all of the following: a) Append a Reply-To: [EMAIL PROTECTED] (Actually, its [EMAIL PROTECTED] ) b) Send the e-mail to my Hotmail account, but everything seems fine. The address shown at the From: line is even the one I used in the Script. c) Because I have placed the Script into a server and not a local machine, asked the sysadmin to check the php.ini file and so but nothing. This step is crucial for my scripting and because all of my clients live here, most of them use the same ISP and have to get their e-mails. Actually, I didn't know how to change the content-type for my e-mail in order to do some testing. Can anyone help me with this? Might be my last chance... Thanks in advance, mailto:[EMAIL PROTECTED] César Aracena IS / MCSE+I Neuquén, NQN (0299) 156-356688 (0299) 446-6621
Re: [PHP] mail() problem
Hello, On 06/06/2002 12:42 AM, César l . aracena wrote: Ok. I've done everything that all of you told me to do, but still can't get to send e-mails to my ISP's mail address. I did all of the following: a) Append a Reply-To: [EMAIL PROTECTED] (Actually, it?s [EMAIL PROTECTED] ) b) Send the e-mail to my Hotmail account, but everything seems fine. The address shown at the From: line is even the one I used in the Script. c) Because I have placed the Script into a server and not a local machine, asked the sysadmin to check the php.ini file and so but nothing. This step is crucial for my scripting and because all of my clients live here, most of them use the same ISP and have to get their e-mails. Actually, I didn't know how to change the content-type for my e-mail in order to do some testing. Can anyone help me with this? Might be my last chance... You may want to try these classes: SMTP Client class - enable debug to see dialog with SMTP server http://www.phpclasses.org/smtpclass MIME message sending and composing http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php