Re: [PHP] Re: Mail subject encoding breaks
Hello, on 05/11/2009 12:25 PM Thodoris said the following: This script seems to work ok in a freebsd development server I have but a linux production machine breaks the subject's encoding for some unexpected reason. The subject has a mix of English and Greek characters that FreeBSD seems to handle like a charm. Both machines have the same php version (5.2.9) and the scripts encoding is UTF-8. Iconv and mbstring are configured the same way in php.ini (although I am not aware whether phpmailer uses iconv or mbstring). Has anyone had a similar experience? Is it possible that sendmail (which is the underlying tool) breaks the mail encoding? I am not sure what you mean by breaking the mail encoding. I use the MIME message class and it works perfectly with any encoding, even multibyte character sets. Take a look at the examples test_email_message and test_multibyte_message.php . http://www.phpclasses.org/mimemessage I am not sure what is happening exactly but I think that for some reason the subject of the e-mail includes more than one encoding while using linux. The English part is encoded in ISO-8859-1 and the Greek part into something that I can't detect (probably because thunderbird doesn't support all encodings). The body of the message is UTF-8 as expected. I didn't try the suggested solution since I have solved this, but the original question was about phpmailer. I will give it a try however because it seems like a better solution and more robust than mail_utf8. -- Thodoris
Re: [PHP] Re: mail() is duplicating
Hello, on 03/17/2009 05:34 PM Ashley Sheridan said the following: >>> I have several forms on my site that use the same sequence of events: >>> The first script displays and validates the form data, the second >>> reformats and asks for confirmation or editing, and the third script >>> sends the data in an email to the relevent people. >>> >>> Two of these forms work exactly as they're supposed to but the third >>> sends duplicate emails to everyone. >>> >>> I have looked and looked and I've run diff and I can see no reason why >>> this should be happening. >>> >>> Could someone suggest what I might have wrong? >> Usually this happens when you have a To: header in the headers parameters. > Another possibility is that the mail sending is triggered from a page > that is called from a get request rather than post. Some browsers > actually make more than one call when the page is get, thereby > triggering the duplicate mail creation. I had a similar thing with a > database update once before, it's a bugger to be rid of without > switching to post. I suspect that may happen with nervous users that double click form submit buttons. Usually I use this forms class that has a built-in feature to show a form resubmit confirmation message when the use uses the submit function more than once: http://www.phpclasses.org/formsgeneration That feature can be seen in this page: http://www.meta-language.net/forms-examples.html?example=test_form -- Regards, Manuel Lemos Find and post PHP jobs http://www.phpclasses.org/jobs/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() is duplicating
On Fri, 2009-03-13 at 22:54 -0300, Manuel Lemos wrote: > Hello, > > on 03/13/2009 05:37 PM Rick Pasotto said the following: > > I have several forms on my site that use the same sequence of events: > > The first script displays and validates the form data, the second > > reformats and asks for confirmation or editing, and the third script > > sends the data in an email to the relevent people. > > > > Two of these forms work exactly as they're supposed to but the third > > sends duplicate emails to everyone. > > > > I have looked and looked and I've run diff and I can see no reason why > > this should be happening. > > > > Could someone suggest what I might have wrong? > > Usually this happens when you have a To: header in the headers parameters. > > -- > > Regards, > Manuel Lemos > > Find and post PHP jobs > http://www.phpclasses.org/jobs/ > > PHP Classes - Free ready to use OOP components written in PHP > http://www.phpclasses.org/ > Another possibility is that the mail sending is triggered from a page that is called from a get request rather than post. Some browsers actually make more than one call when the page is get, thereby triggering the duplicate mail creation. I had a similar thing with a database update once before, it's a bugger to be rid of without switching to post. Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() takes too much time
Colin Guthrie wrote: Stut wrote: Matthew Lasar wrote: I run pretty simple mail group distribution program that uses php/mysql and the mail() function. I adapted it from an open source script. Most of the time it runs well. But it does take a while to run through all 150 members of the list. So I'm half glad that I don't have a list of 1000 people or more. Any way to optimize the mail function in terms of speed? Probably too vague a question, sorry. Don't use the mail function. On a unix-based system it will pass the message directly to sendmail which will attempt to deliver the message in realtime. When you're sending a large amount of mail that sucks. Your best option is to switch to using a system that connects to the SMTP server on localhost directly. That way you can dump each message on to the local MTA quickly and then forget about it. I don't think this is correct, at least on my system. I know this because I deliberatly ban internal machines on my network from delivering mail to outside server (internal LAN cannot connect to port 25 on any system other than our gateway - this is to stop any windows machines that may sneak into my network from spamming the world!). When I test web apps locally I have to watch to override email addresses such that I don't try to sent to real people but when I forget, they all end up stuck in my local machine's MTA. So for that reason, mail() must speak to my MTA, not try to deliver directly. Perhaps it depends on your sendmail implementation? I prefer postfix (which has a sendmail compatible binary). YMMV. It depends a lot on how your machine is configured, but the way I described it is usually the way it works. Note that if sendmail cannot send the messages immediately it will pass it into the local mail queue and that's probably what's happening on your system because sendmail will find port 25 blocked. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() takes too much time
Matthew Lasar wrote: I run pretty simple mail group distribution program that uses php/mysql and the mail() function. I adapted it from an open source script. Most of the time it runs well. But it does take a while to run through all 150 members of the list. So I'm half glad that I don't have a list of 1000 people or more. Any way to optimize the mail function in terms of speed? Probably too vague a question, sorry. Don't use the mail function. On a unix-based system it will pass the message directly to sendmail which will attempt to deliver the message in realtime. When you're sending a large amount of mail that sucks. Your best option is to switch to using a system that connects to the SMTP server on localhost directly. That way you can dump each message on to the local MTA quickly and then forget about it. As an example one of the newletters I maintain has over 300,000 subscribers and the system that sends the emails (written in PHP of course) takes less than 6 hours. The mail queue on that machine gets very big and then it's up to the MTA to work through sending the messages as quickly as it can (which usually takes about 28 hours). -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() takes too much time
Matthew Lasar wrote: I run pretty simple mail group distribution program that uses php/mysql and the mail() function. I adapted it from an open source script. Most of the time it runs well. But it does take a while to run through all 150 members of the list. So I'm half glad that I don't have a list of 1000 people or more. Any way to optimize the mail function in terms of speed? Probably too vague a question, sorry. Have a look at the Swift Mailer package: http://www.swiftmailer.org/ I use it to send out well over 1000 mails at a time and it works quite fine for me. Check out the anti-flood extension for sending large batches: $swift = new Swift(new Swift_Connection_SMTP('localhost'), 'domain.org'); /* 100 mails per batch with a 30 second pause between batches */ $swift->attachPlugin(new Swift_Plugin_AntiFlood(100, 30), 'anti-flood'); /* list of recipients is an object wrapping an array */ $recipients = new Swift_RecipientList(); $recipients->addTo('[EMAIL PROTECTED]', 'foo bar'); /* headers */ $message = new Swift_Message('the subject'); $message->setCharset('utf-8'); $message->setReplyTo('[EMAIL PROTECTED]'); $message->setReturnPath('[EMAIL PROTECTED]'); $message->headers->set('Errors-To', '[EMAIL PROTECTED]'); /* multipart is a breeze */ $message->attach(new Swift_Message_Part($plain_content)); $message->attach(new Swift_Message_Part($html_content, 'text/html')); /* if you're sending the mails from, eg. an admin page ... */ set_time_limit(0); ignore_user_abort(); flush(); /* send it out */ $num_sent = $swift->batchSend($message, $recipients, new Swift_Address('[EMAIL PROTECTED]', 'from')); This really should be rolled into the PEAR project, IMO. brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail header questions
Hi there Chantal, Hi all, have you ever thought of using phpMailer or swiftmailer? That has solved me a lot of hassle with time, especially as far as correctly setting the Return-Path is concerned. Good luck ! Chantal Rosmuller wrote: >>> The strange thing is that even the fifth parameter solution doesn't work. >>> I use Postfix as MTA by the way. >> Strange - I use postfix on my dev server and it works fine. Are you >> running anything non-default in postfix (eg chroot) ? >> >> -- >> Postgresql & php tutorials >> http://www.designmagick.com/ > > Hi Chris, the fifth parameter did work when I tested it later on my > webserver, > so there's something wrong with postfix on my local machine. > > regards, Chantal > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail header questions
> > The strange thing is that even the fifth parameter solution doesn't work. > > I use Postfix as MTA by the way. > > Strange - I use postfix on my dev server and it works fine. Are you > running anything non-default in postfix (eg chroot) ? > > -- > Postgresql & php tutorials > http://www.designmagick.com/ Hi Chris, the fifth parameter did work when I tested it later on my webserver, so there's something wrong with postfix on my local machine. regards, Chantal -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail header questions
Chantal Rosmuller wrote: On Wednesday 29 November 2006 00:45, Chris wrote: you will most likely change what I forgot to mention that I can't set the return-path either. That can *only* be an email address - you can't include a "name" in the return-path. Also it can't be changed if safe-mode is on for the server. From your code, where does $mainmail come from? It's not in the code you posted at all. $headers .= "From: $mainmail \r\n"; -- Postgresql & php tutorials http://www.designmagick.com/ Hi Chris, The return path works now, $mainmail comes from a different file config.php that is included. $mainmail is also used for the return-path and that works so $mainmail being empty is also not the problem. The strange thing is that even the fifth parameter solution doesn't work. I use Postfix as MTA by the way. Strange - I use postfix on my dev server and it works fine. Are you running anything non-default in postfix (eg chroot) ? -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail header questions
On Wednesday 29 November 2006 00:45, Chris wrote: you will most likely change what > > > > I forgot to mention that I can't set the return-path either. > > That can *only* be an email address - you can't include a "name" in the > return-path. Also it can't be changed if safe-mode is on for the server. > > From your code, where does $mainmail come from? It's not in the code > you posted at all. > > $headers .= "From: $mainmail \r\n"; > > -- > Postgresql & php tutorials > http://www.designmagick.com/ Hi Chris, The return path works now, $mainmail comes from a different file config.php that is included. $mainmail is also used for the return-path and that works so $mainmail being empty is also not the problem. The strange thing is that even the fifth parameter solution doesn't work. I use Postfix as MTA by the way. Chantal -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail header questions
Chantal Rosmuller wrote: Hi Manuel, 1) I can't get the From header right, when I receive the test mail the sender is apache There is From: and From . From is not a real header. It is just set by some MTA to the return path address and is also used as separator in mailbox files with multiple messages in the mbox format. If you can set the Return-Path address, you will most likely change what appears in the From header. I forgot to mention that I can't set the return-path either. That can *only* be an email address - you can't include a "name" in the return-path. Also it can't be changed if safe-mode is on for the server. From your code, where does $mainmail come from? It's not in the code you posted at all. $headers .= "From: $mainmail \r\n"; -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail header questions
Hi Manuel, > > 1) I can't get the From header right, when I receive the test mail the > > sender is apache > > There is From: and From . From is not a real header. It is just set by > some MTA to the return path address and is also used as separator in > mailbox files with multiple messages in the mbox format. > > If you can set the Return-Path address, you will most likely change what > appears in the From header. I forgot to mention that I can't set the return-path either. > You may want to try this using the MIME message composing and sending > class, that lets you set the Return-Path header and can also detect the > right line break sequence for your platform. > > http://www.phpclasses.org/mimemessage > That's a good idea, but I would still like to know what I am doing wrong in my own script. Thanks for your help > > 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
Re: [PHP] Re: Mail in Spam Box
On 6/19/06, eqla3.com eqla3.com <[EMAIL PROTECTED]> wrote: is there an example of the correct code? is my messege get in the right place? === web archive http://7b99.com/";>.
Re: [PHP] Re: Mail in Spam Box
is there an example of the correct code?
Re: [PHP] Re: Mail in Spam Box - its working now
Hey! Its working now. I replaced @mydomain with some valid mail address (gmail address) and the mail was delivered to the Inbox. Feel free to use the code if it helps. Attachments are allowed. Also, it works without a subject (for gmail), but the mail address I used now was genuine. Also genuine yahoo addresses are allowed, but not fake ones. Pls tell me how does gmail know if the address from some remote domain is genuine and not fake? After all, everything else is same. Thanks Community KM On 6/19/06, Manuel Lemos < [EMAIL PROTECTED]> wrote: on 06/18/2006 12:29 PM kartikay malhotra said the following: > I've use PHP mail to send mail to my Gmail ID. But it gets delivered to my > Spam box and not the Inbox :( > > Am I missing a header, signature, certificate? Maybe if you show how you are composing the message you are sending we can advise. -- 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
Re: [PHP] Re: mail() and Return-Path header
On Thu, February 2, 2006 7:23 am, Barry wrote: > Søren Schimkat wrote: >> Hi Guys >> >> I'm using the mail function for sending mail, and I would like to >> specify the >> Return-Path header, but it would seem that PHP or Apache is >> modyfying the >> header. >> >> This is the simple code: >> >> mail('[EMAIL PROTECTED]', 'Subject', 'Message', "From: >> [EMAIL PROTECTED]: [EMAIL PROTECTED]"); >> >> .. but when the message bounces - it bounces to [EMAIL PROTECTED] >> instead of >> the bounce adress? >> >> Any hints on how to solve this problem? >> >> > Return Path? isn't it Reply-To? Return-path: and Reply-To: are definately different headers. Return-path is NOT a normal header, and cannot be set through the 4th PHP argument. It can be set by the 5th argument. This feature was added in 4.0.5 -- and if you're using something older than that, you should upgrade anyway. :-) http://php.com/manual/en/function.mail.php You want a valid Return-path: to help avoid spam filters, and to get back error messages from MTA/MUAs that don't trust From and Reply-to. Course, it's only a matter of time before Return-path is not trusted, and some genius will come up with YAH (yet another header) that we'll all have to cope with. :-v -- 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] Re: mail() and Return-Path header
Quoting Barry <[EMAIL PROTECTED]>: > Søren Schimkat wrote: > > Hi Guys > > > > I'm using the mail function for sending mail, and I would like to specify > the > > Return-Path header, but it would seem that PHP or Apache is modyfying the > > header. > > > > This is the simple code: > > > > mail('[EMAIL PROTECTED]', 'Subject', 'Message', "From: > > [EMAIL PROTECTED]: [EMAIL PROTECTED]"); > > > > .. but when the message bounces - it bounces to [EMAIL PROTECTED] instead > of > > the bounce adress? > > > > Any hints on how to solve this problem? > > > > > Return Path? isn't it Reply-To? > Nope. The Reply-To header is for reply's. Bouncing of mail due to errors is sendt to the adress set by the Return-Path header. > -- > Smileys rule (cX.x)C --o(^_^o) > Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- mvh Søren Schimkat www.schimkat.dk --- www.dyrenes-venner.dk/densorteliste.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mail-format...
- Original Message - From: "M. Sokolewicz" <[EMAIL PROTECTED]> To: "Gustav Wiberg" <[EMAIL PROTECTED]> Cc: ; "joshua may" <[EMAIL PROTECTED]> Sent: Thursday, September 22, 2005 5:24 PM Subject: Re: [PHP] Re: Mail-format... Gustav Wiberg wrote: - Original Message - From: "joshua may" <[EMAIL PROTECTED]> To: Sent: Thursday, September 22, 2005 9:50 AM Subject: [PHP] Re: Mail-format... I was having the same issue with one of my clients just today in fact. We just filtered the email addresses to ensure they're valid. There's a million regex's out there to do this for you.. Cheers Josh Gustav Wiberg wrote: Hi there! I wonder why I get get these kind of mails (look down below in this mail) I recieve them sometimes... ...I have a code like this... $name = $_POST["frmNamn"]; $email = $_POST["frmEpost"]; //Send mail that there is a new member // mail("[EMAIL PROTECTED]","Ny medlem - Stammis Internet","Namn: $name, Epost:$email"); /G http://www.varupiraten.se/ Namn: [EMAIL PROTECTED] Content-Type: multipart/mixed; boundary=\"===0158601545==\" MIME-Version: 1.0 Subject: c1805938 To: [EMAIL PROTECTED] bcc: [EMAIL PROTECTED] From: [EMAIL PROTECTED] This is a multi-part message in MIME format. --===0158601545== Content-Type: text/plain; charset=\"us-ascii\" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit aienglpcm --===0158601545==-- , Epost:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.11.4/109 - Release Date: 2005-09-21 Hi there! A million? Have you done the count? ;-) *just joking* Thanx! /G http://www.varupiraten.se/ No counting, but I'm pretty sure there's more than a million ;p Every php (wanna-be) dev creates a regexp for email-validation at some point (or even more than one). So I'm pretty sure there's *tons* of them (and that means billions, and probably more). Unless you want unique regexps, which brings it down to quite a lot less ;p - tul *lol* Guess it's hard to find a unique solution when there's tons out there.. What search-string should be applied in google? (regexp + mail ?) /G http://www.varupiraten.se/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mail-format...
Gustav Wiberg wrote: - Original Message - From: "joshua may" <[EMAIL PROTECTED]> To: Sent: Thursday, September 22, 2005 9:50 AM Subject: [PHP] Re: Mail-format... I was having the same issue with one of my clients just today in fact. We just filtered the email addresses to ensure they're valid. There's a million regex's out there to do this for you.. Cheers Josh Gustav Wiberg wrote: Hi there! I wonder why I get get these kind of mails (look down below in this mail) I recieve them sometimes... ...I have a code like this... $name = $_POST["frmNamn"]; $email = $_POST["frmEpost"]; //Send mail that there is a new member // mail("[EMAIL PROTECTED]","Ny medlem - Stammis Internet","Namn: $name, Epost:$email"); /G http://www.varupiraten.se/ Namn: [EMAIL PROTECTED] Content-Type: multipart/mixed; boundary=\"===0158601545==\" MIME-Version: 1.0 Subject: c1805938 To: [EMAIL PROTECTED] bcc: [EMAIL PROTECTED] From: [EMAIL PROTECTED] This is a multi-part message in MIME format. --===0158601545== Content-Type: text/plain; charset=\"us-ascii\" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit aienglpcm --===0158601545==-- , Epost:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.11.4/109 - Release Date: 2005-09-21 Hi there! A million? Have you done the count? ;-) *just joking* Thanx! /G http://www.varupiraten.se/ No counting, but I'm pretty sure there's more than a million ;p Every php (wanna-be) dev creates a regexp for email-validation at some point (or even more than one). So I'm pretty sure there's *tons* of them (and that means billions, and probably more). Unless you want unique regexps, which brings it down to quite a lot less ;p - tul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mail-format...
- Original Message - From: "joshua may" <[EMAIL PROTECTED]> To: Sent: Thursday, September 22, 2005 9:50 AM Subject: [PHP] Re: Mail-format... I was having the same issue with one of my clients just today in fact. We just filtered the email addresses to ensure they're valid. There's a million regex's out there to do this for you.. Cheers Josh Gustav Wiberg wrote: Hi there! I wonder why I get get these kind of mails (look down below in this mail) I recieve them sometimes... ...I have a code like this... $name = $_POST["frmNamn"]; $email = $_POST["frmEpost"]; //Send mail that there is a new member // mail("[EMAIL PROTECTED]","Ny medlem - Stammis Internet","Namn: $name, Epost:$email"); /G http://www.varupiraten.se/ Namn: [EMAIL PROTECTED] Content-Type: multipart/mixed; boundary=\"===0158601545==\" MIME-Version: 1.0 Subject: c1805938 To: [EMAIL PROTECTED] bcc: [EMAIL PROTECTED] From: [EMAIL PROTECTED] This is a multi-part message in MIME format. --===0158601545== Content-Type: text/plain; charset=\"us-ascii\" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit aienglpcm --===0158601545==-- , Epost:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.11.4/109 - Release Date: 2005-09-21 Hi there! A million? Have you done the count? ;-) *just joking* Thanx! /G http://www.varupiraten.se/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() and Verizon
--- Sam Smith <[EMAIL PROTECTED]> wrote: > > have you tried sending the same message, via the same path (i.e., > > smtp server), but not generated via php, to this recipient? by > > "same" that includes the same rfc821 "from"/return-path. > > I logged on to the web server where php is running and did telnet > localhost > 25 > hello ... > > The mail was reported to have not been received. > > > > > do make certain that your correspondent doesn't have some funky > spam > > filtering of their own. > > Excellent idea. > > > > > the bottom line, however, is that this isn't a php issue. you're > > successfully getting the message, so your script is working fine. > > Yes, thanks. I believe the problem is that Verizon checks the MAIL FROM address during the SMTP session against the domain portion of the From header. If they don't match, the mail is rejected (or dropped). This was an issue for a webboard I use... > > -- > 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!? Declare Yourself - Register online to vote today! http://vote.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() and Verizon
> have you tried sending the same message, via the same path (i.e., > smtp server), but not generated via php, to this recipient? by > "same" that includes the same rfc821 "from"/return-path. I logged on to the web server where php is running and did telnet localhost 25 hello ... The mail was reported to have not been received. > > do make certain that your correspondent doesn't have some funky spam > filtering of their own. Excellent idea. > > the bottom line, however, is that this isn't a php issue. you're > successfully getting the message, so your script is working fine. Yes, thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() and Verizon
> Hello, > > On 10/01/2004 12:47 AM, Sam Smith wrote: >> Can anyone tell why the mail (see below) is not being relayed to >> [EMAIL PROTECTED]: >> >> #Note: There were 2 "To:" addresses. Below is the header from the successful >> mail to the second address. > > Each address will receive different message copies. I wish. The problem is the first address is not receiving the message. I suspect the verizon mail server is rejecting it thinking it's spam because of something missing in the header. I put the "Note" in so no one would be confused by the fact the example mail *was* delivered successfully. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() function problem
Thank you Lone , I will try it out "Lone Wolf" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > What you need to do is set your SMTP server inside the php.ini file... > > > [mail function] > SMTP = smtp.server.com ; for win32 only > sendmail_from = [EMAIL PROTECTED] ; for win32 only > ;sendmail_path = ;for unix only, may supply arguments as well ; (default is > sendmail -t) > > The test string I used to make sure my example worked: > print mail ('[EMAIL PROTECTED]', > 'No need for reply -- PHP test!', /* subject */ > "hi JohnnLine 2n");/* body*/ > ?> > > Robert > > > -Original Message- > > From: Dre [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, September 01, 2004 6:48 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] Re: mail() function problem > > > > > > Sorry .. but I'm really so new at this > > I'm using Apache Server on a MS Windows XP Pro. OS, and I'm > > trying to send a mail through a form .. what do I need to > > install or configure to be able to do this. > > > > thanks in advance > > > > > > "Dre" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > I'm using an Apache server .. doesn't it come with a > > sendmail program > > > ?? I really don't know > > > > > > "Jasper Howard" <[EMAIL PROTECTED]> wrote in message > > > news:[EMAIL PROTECTED] > > > > do you have a sendmail program on your testing server? > > > > > > > > -- > > > > > > > > > > > > -->> > > > > Jasper Howard :: Database Administration > > > > Velocity7 > > > > 1.530.470.9292 > > > > http://www.Velocity7.com/ > > > > <<-- > > > > "Dre" <[EMAIL PROTECTED]> wrote in message > > > > news:[EMAIL PROTECTED] > > > > > Hi > > > > > I was trying to use the mail() function, but it did not work, > > > > > maybe > > > > because > > > > > of some settings problem or something that I can't figure out > > > > > > > > > > I went online and tried to execute the following > > > > > //=== > > > > >> > > > $from = $_POST['from']; > > > > > $subject = $_POST['subject']; > > > > > $content = $_POST['content']; > > > > > $to = "[EMAIL PROTECTED]"; > > > > >$headers = "From:".$from; > > > > > if(mail($to, $subject, $content, "From: $from")) { > > > > > echo"sent"; > > > > > } > > > > > else{ echo "not sent"; > > > > > } > > > > > ?> > > > > > //=== > > > > > the variable values sent from a Form in another and > > they are sent > > > > correctly > > > > > > > > > > but I keep having this error > > > > > //=== > > > > > Warning: mail(): Failed to connect to mailserver at "localhost" > > > > > port > > 25, > > > > > verify your "SMTP" > > > > > and "smtp_port" setting in php.ini or use ini_set() in > > C:\Program > > > > > Files\Apache Group\Apache2\htdocs\mysite/myfile.php on line > > > 194 > > > > > //=== > > > > > > > > > > > > > > > my php.ini settings for the mail function are > > > > > > > > > > //= > > > > > [mail function] > > > > > ; For Win32 only. > > > > > SMTP = localhost > > > > > > > > > > smtp_port = 25 > > > > > sendmail_from = [EMAIL PROTECTED] //= > > > > > > > > > > thanks in advance > > > > > Dre, > > > > -- > > 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] Re: mail() function problem
What you need to do is set your SMTP server inside the php.ini file... [mail function] SMTP = smtp.server.com ; for win32 only sendmail_from = [EMAIL PROTECTED] ; for win32 only ;sendmail_path = ;for unix only, may supply arguments as well ; (default is sendmail -t) The test string I used to make sure my example worked: Robert > -Original Message- > From: Dre [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 01, 2004 6:48 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Re: mail() function problem > > > Sorry .. but I'm really so new at this > I'm using Apache Server on a MS Windows XP Pro. OS, and I'm > trying to send a mail through a form .. what do I need to > install or configure to be able to do this. > > thanks in advance > > > "Dre" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > I'm using an Apache server .. doesn't it come with a > sendmail program > > ?? I really don't know > > > > "Jasper Howard" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > do you have a sendmail program on your testing server? > > > > > > -- > > > > > > > > > -->> > > > Jasper Howard :: Database Administration > > > Velocity7 > > > 1.530.470.9292 > > > http://www.Velocity7.com/ > > > <<-- > > > "Dre" <[EMAIL PROTECTED]> wrote in message > > > news:[EMAIL PROTECTED] > > > > Hi > > > > I was trying to use the mail() function, but it did not work, > > > > maybe > > > because > > > > of some settings problem or something that I can't figure out > > > > > > > > I went online and tried to execute the following > > > > //=== > > > >> > > $from = $_POST['from']; > > > > $subject = $_POST['subject']; > > > > $content = $_POST['content']; > > > > $to = "[EMAIL PROTECTED]"; > > > >$headers = "From:".$from; > > > > if(mail($to, $subject, $content, "From: $from")) { > > > > echo"sent"; > > > > } > > > > else{ echo "not sent"; > > > > } > > > > ?> > > > > //=== > > > > the variable values sent from a Form in another and > they are sent > > > correctly > > > > > > > > but I keep having this error > > > > //=== > > > > Warning: mail(): Failed to connect to mailserver at "localhost" > > > > port > 25, > > > > verify your "SMTP" > > > > and "smtp_port" setting in php.ini or use ini_set() in > C:\Program > > > > Files\Apache Group\Apache2\htdocs\mysite/myfile.php on line > > 194 > > > > //=== > > > > > > > > > > > > my php.ini settings for the mail function are > > > > > > > > //= > > > > [mail function] > > > > ; For Win32 only. > > > > SMTP = localhost > > > > > > > > smtp_port = 25 > > > > sendmail_from = [EMAIL PROTECTED] //= > > > > > > > > thanks in advance > > > > Dre, > > -- > 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] Re: mail() function problem
If you use Windows as your server,You must install M$Exchange server.It is a mailserver under Windows. Of course,If you want to install Linux,I can help u. It has benefit for u. Even i made a group on yahoo "phplovers". You can join to my group & will get help. It has 56 members. My email address is m_pahlevanzadeh at yahoo dot com If you have a question on Linux,I can help u. But it is your chioce...Linux or Windows. When you develop under windows,You must upload it to an UNIX box.May be you will have problem. Please start with Linux as your OS. Yours,Mohsen --- Dre <[EMAIL PROTECTED]> wrote: > Sorry .. but I'm really so new at this > I'm using Apache Server on a MS Windows XP Pro. OS, > and I'm trying to send a > mail through a form .. > what do I need to install or configure to be able to > do this. > > thanks in advance > > > "Dre" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > I'm using an Apache server .. doesn't it come with > a sendmail program ?? > > I really don't know > > > > "Jasper Howard" <[EMAIL PROTECTED]> wrote in > message > > news:[EMAIL PROTECTED] > > > do you have a sendmail program on your testing > server? > > > > > > -- > > > > > > > > > > -->> > > > Jasper Howard :: Database Administration > > > Velocity7 > > > 1.530.470.9292 > > > http://www.Velocity7.com/ > > > > <<-- > > > "Dre" <[EMAIL PROTECTED]> wrote in message > > > news:[EMAIL PROTECTED] > > > > Hi > > > > I was trying to use the mail() function, but > it did not work, maybe > > > because > > > > of some settings problem or something that I > can't figure out > > > > > > > > I went online and tried to execute the > following > > > > > //=== > > > >> > > $from = $_POST['from']; > > > > $subject = $_POST['subject']; > > > > $content = $_POST['content']; > > > > $to = "[EMAIL PROTECTED]"; > > > >$headers = "From:".$from; > > > > if(mail($to, $subject, $content, "From: > $from")) { > > > > echo"sent"; > > > > } > > > > else{ echo "not sent"; > > > > } > > > > ?> > > > > > //=== > > > > the variable values sent from a Form in > another and they are sent > > > correctly > > > > > > > > but I keep having this error > > > > > //=== > > > > Warning: mail(): Failed to connect to > mailserver at "localhost" port > 25, > > > > verify your "SMTP" > > > > and "smtp_port" setting in php.ini or use > ini_set() in > > > > C:\Program Files\Apache > Group\Apache2\htdocs\mysite/myfile.php on line > > 194 > > > > > //=== > > > > > > > > > > > > my php.ini settings for the mail function are > > > > > > > > //= > > > > [mail function] > > > > ; For Win32 only. > > > > SMTP = localhost > > > > > > > > smtp_port = 25 > > > > sendmail_from = [EMAIL PROTECTED] > > > > //= > > > > > > > > thanks in advance > > > > Dre, > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator & programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() function problem
Please switch to a UNIX box.For example Fedora. Because it has everythings that you need. --- Dre <[EMAIL PROTECTED]> wrote: > I'm using an Apache server .. doesn't it come with a > sendmail program ?? > I really don't know > > "Jasper Howard" <[EMAIL PROTECTED]> wrote in > message > news:[EMAIL PROTECTED] > > do you have a sendmail program on your testing > server? > > > > -- > > > > > > > -->> > > Jasper Howard :: Database Administration > > Velocity7 > > 1.530.470.9292 > > http://www.Velocity7.com/ > > > <<-- > > "Dre" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > Hi > > > I was trying to use the mail() function, but it > did not work, maybe > > because > > > of some settings problem or something that I > can't figure out > > > > > > I went online and tried to execute the following > > > > //=== > > >> > $from = $_POST['from']; > > > $subject = $_POST['subject']; > > > $content = $_POST['content']; > > > $to = "[EMAIL PROTECTED]"; > > >$headers = "From:".$from; > > > if(mail($to, $subject, $content, "From: > $from")) { > > > echo"sent"; > > > } > > > else{ echo "not sent"; > > > } > > > ?> > > > > //=== > > > the variable values sent from a Form in another > and they are sent > > correctly > > > > > > but I keep having this error > > > > //=== > > > Warning: mail(): Failed to connect to mailserver > at "localhost" port 25, > > > verify your "SMTP" > > > and "smtp_port" setting in php.ini or use > ini_set() in > > > C:\Program Files\Apache > Group\Apache2\htdocs\mysite/myfile.php on line > 194 > > > > //=== > > > > > > > > > my php.ini settings for the mail function are > > > > > > //= > > > [mail function] > > > ; For Win32 only. > > > SMTP = localhost > > > > > > smtp_port = 25 > > > sendmail_from = [EMAIL PROTECTED] > > > //= > > > > > > thanks in advance > > > Dre, > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator & programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mail Functions help
On Wednesday 01 September 2004 22:50, [EMAIL PROTECTED] wrote: > I did some research and found out that my ISP's SMTP server is > smtp.comcast.net. That's what we like to see. > If I configure my mail functions to connect to this should my script be > able to send e-mails? > > Research and Experimentation (yes, I did some!): Yep, you're getting there ... > I tried connecting to it using this telnet command: > > telnet smtp.comcast.net If you don't specify a port number telnet will default to the 'telnet' port which is 23. > But I got this: > > Connecting to smtp.comcast.net..could not connect to smtp.comcast.net on > port 23. A connecting attempt failed because the connection party did not > properly respond after a period of time.. > Then I tried this: > > telnet smtp.comcast.net 25 > > A new window popped up and said this: > > 220 Comcast.net - Mailennium ESMTP/Multibox rwcrmhc11 #140 > > Did it work? So if I put smtp.comcast.net in php.ini should my e-mail > script work? Yes it would work, providing that: 1) that the machine which you tried the telnet on is the same as your webserver 2) Comcast really is your upstream provider and allows you to relay (send) mail through smtp.comcast.net -- 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 -- /* The perversity of nature is nowhere better demonstrated by the fact that, when exposed to the same atmosphere, bread becomes hard while crackers become soft. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mail Functions help
From: <[EMAIL PROTECTED]> Did it work? So if I put smtp.comcast.net in php.ini should my e-mail script work? I don't know about you, but my magic-php-8-ball says "Yes!" http://www.amazon.com/exec/obidos/ASIN/B1ZWV7/indrasnet/002-7362067-2944804 Make sure you restart your webserver after the php.ini change, of course. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mail Function
Will wrote: My sendmail_from is as follows: sendmail_from = [EMAIL PROTECTED] Did you restart Apache (assuming you're using the module) after making this change? -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mail Function
Hi, Tuesday, March 9, 2004, 12:05:22 AM, you wrote: W> Please help me with this. Can someone give me an example of their W> php.ini on the settings of the mail function. W> ~WILL~ A wild guess but try it with \r\n as line endings, I don't run the server under windows so can't help with the ini settings. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail question (mime)
W cool. I went there, but I thought this class only worked for sending mails. Great! Justin Patrin wrote: Well, you could look for yourself. ;-) Yes, there is. Mail_Mime does both encoding and decoding. http://pear.php.net/package/Mail_Mime -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail question (mime)
Cesar Cordovez wrote: ...and talking about mail, is there a class to parse an incoming mail? Let me explain: I'm using the great POP3 pear class to receive mail, but I'm having trouble separating the different parts in an "multipart/alternative" type of msg. Is there a class to receive the result from POP3 class and convert it into an array of all the specific parts of an mail? Well, you could look for yourself. ;-) Yes, there is. Mail_Mime does both encoding and decoding. http://pear.php.net/package/Mail_Mime -- paperCrane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail question (mime)
...and talking about mail, is there a class to parse an incoming mail? Let me explain: I'm using the great POP3 pear class to receive mail, but I'm having trouble separating the different parts in an "multipart/alternative" type of msg. Is there a class to receive the result from POP3 class and convert it into an array of all the specific parts of an mail? Thanks! Justin Patrin wrote: You may want to try using PEAR's Mail_Mime class. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail -f option for removing nobody@localhost Return-Path
Manuel Lemos wrote: [ snip ] Anyway, you may want to try this class that has work arounds to mail function bugs and emulates what you want by passing the Return-Path header: http://www.phpclasses.org/mimemessage Another good one is http://phpmailer.sourceforge.net PEAR also has a good Mail package. -- Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com --- "Documentation is like sex: when it is good, it is very, very good; and when it is bad, it is better than nothing." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() function, how to get it work?
Manuel Lemos wrote: Hello, On 10/03/2003 12:44 PM, Kristian Snabb wrote: How do I set up the mail() function in php.ini. How do I define the username and password? My smtp service requires me to log on. I'm using Apache 2.0.47 on WinXP Pro. There is no way to set SMTP authentication using the mail() function. Since you are one WinXP Pro -- you can download something like postcast http://www.postcast.com (a free SMTP server), and use that instead. However, the original statement is correct ... mail() doesn't support SMTP authentication. -- Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mail() question
You can also use ini_set or .htaccess to increase the max execution time for the PHP script. I have some reports that used to take 5 or 6 minutes to run and this worked well, note though that IE has a timeout where it will close the connection if the page has not finished loading within n seconds, you can increase it in the registry. Rather than waiting for mail() to complete for each e-mail you want to send an often recommended approach is writing the e-mail directly into the mail queue so your mail client picks it up when it runs. Take a look at the PEAR Mail class, it is easy to use and supports multiple backends (http://pear.php.net). Jason Kae Verens wrote: Ryan A wrote: Hi everyone, I am trying to create a new newsletter software as the ones i found on hotscripts were just not good enough or mucho $$ which i dont have :-( Have finished the basics but need some advise now. I am using a mysql database instead of text files. I have a table with the fields "name" and "email", my questions are, 1:is it better to use a for loop and then send each mail? 2:should i first put all the names and addresses into an array? 3:Is it better to send each mail independantly or use BCC? (one mail blast., will it work?) For short lists of emails, yes, it should be fine to send them in one go (one after the other). However, it takes time to send an email, and you are usually allowed only about 30 seconds of CPU time for your script. How I do it is to make a file listing the ids of the users, and the ids of the emails they're to receive, then I have a cron job which sends out one a minute. For heavier loads, you could add another cron job to get two a minute, and so on. Kae -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail()
[EMAIL PROTECTED] (Chris Hayes) wrote in news:[EMAIL PROTECTED]: > Is your script on a yahoo.com PHP-enabled website? > > If not: most servers deny access to the mailer because mailers (often > SMTP servers) with public access have been widely abused in the past, > especially by spammers. If this is the case you need to set PHP up to > use a SMTP server that is available from where your script is. > If you don't know how: what sort of server is your PHP script on? It would be on website and using the hosting's mail server I think. -- *** s2r - public key: (http://leeloo.mine.nu/s2r-gmx.sig) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail()
[EMAIL PROTECTED] (Curt Zirzow) wrote in news:20030722165644.GK67309 @bagend.shire: Ehh you're right, I'll let the mail server to handle that problem. :) > Why are you connection to yahoo to send this mail? sendmail should > handle who to connect to. > > > > Curt -- *** s2r - public key: (http://leeloo.mine.nu/s2r-gmx.sig) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail()
At 18:29 22-7-03, you wrote: [EMAIL PROTECTED] (Joshua Groboski) wrote in news:[EMAIL PROTECTED]: but I will get a relaying is denied because the target domain isn't the same domain I am connected to for eg. yahoo.com > Why don't you send it to [EMAIL PROTECTED] I think as long as > the $to address doesn't fail, you'll be alright Is your script on a yahoo.com PHP-enabled website? If not: most servers deny access to the mailer because mailers (often SMTP servers) with public access have been widely abused in the past, especially by spammers. If this is the case you need to set PHP up to use a SMTP server that is available from where your script is. If you don't know how: what sort of server is your PHP script on? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail()
* Thus wrote Javier ([EMAIL PROTECTED]): > [EMAIL PROTECTED] (Joshua Groboski) wrote in > news:[EMAIL PROTECTED]: > > but I will get a relaying is denied because the target domain isn't the > same domain I am connected to for eg. yahoo.com Why are you connection to yahoo to send this mail? sendmail should handle who to connect to. 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] Re: mail function
* Thus wrote Ivo Fokkema ([EMAIL PROTECTED]): > > >Does mail() return true? I mean, do you get printed "U redu je"? If so, > > > > When PHP sends an email to a non existing email address such as > > [EMAIL PROTECTED], the warning mail you normally get returned often does not > > arrive in your mailbox. Therefore I add two additional headers: > > > > ."Reply-To: [EMAIL PROTECTED]" > > ."Return-path: <[EMAIL PROTECTED]" > > > > and now I do get the notification mail when mail bounces. > That's funny, because I always had that problem, too. By adding Reply-To and > Return-path, it did not fix my problem. Boucing emails never got back to me. > Return-path was overwritten by my hostingserver to '[EMAIL PROTECTED]' and Reply-To > was apparently ignored by the server bouncing the email. Do you think > servers differ in this a lot? So much confusion on mail. Return-Path: inserted by all smtp servers on delivery. Reply-To:handled by client Errors-To: Maybe handled by smtp server. 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] Re: mail function
> >Does mail() return true? I mean, do you get printed "U redu je"? If so, your > >email should've been sent by PHP. > > > >You are really missing a bunch of headers. I'm not sure if this is your > >problem, but I think it's not a bad idea to include more headers, also > >because more and more ISP's add some kind of spamfilter which might drop > >your email. So maybe by adding more headers, you can solve this. > > > >I use this: > > > >$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"; > > > >$body = "Whatever is in your email"; > > > >$to = "Name <[EMAIL PROTECTED]>"; > >$check_mail = mail($to, "Subject", $body, $headers); > > When PHP sends an email to a non existing email address such as > [EMAIL PROTECTED], the warning mail you normally get returned often does not > arrive in your mailbox. Therefore I add two additional headers: > > ."Reply-To: [EMAIL PROTECTED]" > ."Return-path: <[EMAIL PROTECTED]" > > and now I do get the notification mail when mail bounces. That's funny, because I always had that problem, too. By adding Reply-To and Return-path, it did not fix my problem. Boucing emails never got back to me. Return-path was overwritten by my hostingserver to '[EMAIL PROTECTED]' and Reply-To was apparently ignored by the server bouncing the email. Do you think servers differ in this a lot? -- [Win2000 | Apache/1.3.23] [PHP/4.2.3 | MySQL/3.23.53] Ivo Fokkema PHP & MySQL programmer Leiden University Medical Centre Netherlands -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail function
At 10:39 21-7-03, you wrote: > I put this PHP script on web server: > > if (mail("[EMAIL PROTECTED]", "brati", "peda", "From: Peda")== TRUE) > print("U redu je"); > else > print("Greska"); > ?> > > But It seems that mail function doesn't work. I don't get any e-mail. > > Can anyone tell me what is wrong. Does mail() return true? I mean, do you get printed "U redu je"? If so, your email should've been sent by PHP. You are really missing a bunch of headers. I'm not sure if this is your problem, but I think it's not a bad idea to include more headers, also because more and more ISP's add some kind of spamfilter which might drop your email. So maybe by adding more headers, you can solve this. I use this: $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"; $body = "Whatever is in your email"; $to = "Name <[EMAIL PROTECTED]>"; $check_mail = mail($to, "Subject", $body, $headers); When PHP sends an email to a non existing email address such as [EMAIL PROTECTED], the warning mail you normally get returned often does not arrive in your mailbox. Therefore I add two additional headers: ."Reply-To: [EMAIL PROTECTED]" ."Return-path: <[EMAIL PROTECTED]" and now I do get the notification mail when mail bounces. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() - how to attach file to the message???
You had an tag in your email, so I assumed you were trying to upload the file. If the file is not already on the server, you *will* have to upload it before emailing it. But that's a whole other matter. If you look at the classes and see how they attach a file, you should be able to figure it out. Basically, you need to set the correct headers (content-type) and attach an encoded version of the file in the body of the email. An easy way to see what you need it to send yourself an email with an attachment and look at the raw source of the email you receive. It should look a bit like this (with a whole lot more headers in it): From: "Mark" <[EMAIL PROTECTED]> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> Subject: FW: test Content-Type: multipart/mixed; boundary="_=_NextPart_000_01C346F1.7A8C7496" This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --_=_NextPart_000_01C346F1.7A8C7496 Content-Type: multipart/alternative; boundary="_=_NextPart_001_01C346F1.7A8C7496" --_=_NextPart_001_01C346F1.7A8C7496 Content-Type: text/plain; charset="iso-8859-1" This is the body of the email <> --_=_NextPart_000_01C346F1.7A8C7496 Content-Type: image/jpeg; name="test.jpg" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="test.jpg" /9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHR HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMj MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAJaAb AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAw AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKS ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmq . . . --_=_NextPart_000_01C346F1.7A8C7496-- --- szparag <[EMAIL PROTECTED]> wrote: > no. > > i`m not trying to upload file on server. > i want to send e-mail with attachments but if it's possible without > using classes. > > i thought that file should be first uploaded and then send with > e-mail as > attachment, maybe uploading isn't correct... > > i don't know how to do it. > > szparag > > > > > > > > > > > -- > 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!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() - how to attach file to the message???
On Thursday 10 July 2003 16:22, szparag wrote: > no. > > i`m not trying to upload file on server. > i want to send e-mail with attachments but if it's possible without > using classes. > > i thought that file should be first uploaded and then send with e-mail as > attachment, maybe uploading isn't correct... > > i don't know how to do it. You said previously that you had downloaded some classes which allowed you to send mail with attachments. But you don't want to use those classes and want to write your own, but you don't know how. 1) Why don't you want to use those ready made classes? Why re-invent the wheel? 2) OK fine, you don't want to use those classes, so just study them to see how it's done then off you go. 3) Also the subject of "how to attach file to email" has been discussed many times in the past, refer to archives for code. -- 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 -- /* I can't understand why a person will take a year or two to write a novel when he can easily buy one for a few dollars. -- Fred Allen */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() - how to attach file to the message???
no. i`m not trying to upload file on server. i want to send e-mail with attachments but if it's possible without using classes. i thought that file should be first uploaded and then send with e-mail as attachment, maybe uploading isn't correct... i don't know how to do it. szparag -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() - how to attach file to the message???
Also note that the uploaded file will be in the $_FILES[] array. http://us4.php.net/features.file-upload --- Mark <[EMAIL PROTECTED]> wrote: > From your question, it seems you're more concerned with how to get > the file from the user to the server. To upload a file, you need > the > following format for your web form: > > enctype="multipart/form-data"> > Upload file: > > > > That will let you move the file to the server. How you email it > from > their is a whole 'nuther matter. > > > > --- szparag <[EMAIL PROTECTED]> wrote: > > ok. > > > > i have those classes. > > but if it is possible i would like to send message with file > > attachment without using classes. > > > > i know that it should look something like: > > in form : > > > > in script run be something like: > > > > > > if (is_uploaded_file($attach)) > > { > > $headers .= "MIME-Version: 1.0\r\n"; > > > > $headers .= "Content-Type: ".$attach_type."; > > name=".$attach_name."; > > Content-Disposition: attachment"; > > $headers .= "X-Attach: $attach"; > > } > > > > > > but it doesn't work.i miss something. > > > > szparag > > > > -- > > 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!? > SBC Yahoo! DSL - Now only $29.95 per month! > http://sbc.yahoo.com > > -- > 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!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() - how to attach file to the message???
>From your question, it seems you're more concerned with how to get the file from the user to the server. To upload a file, you need the following format for your web form: Upload file: That will let you move the file to the server. How you email it from their is a whole 'nuther matter. --- szparag <[EMAIL PROTECTED]> wrote: > ok. > > i have those classes. > but if it is possible i would like to send message with file > attachment without using classes. > > i know that it should look something like: > in form : > > in script run be something like: > > > if (is_uploaded_file($attach)) > { > $headers .= "MIME-Version: 1.0\r\n"; > > $headers .= "Content-Type: ".$attach_type."; > name=".$attach_name."; > Content-Disposition: attachment"; > $headers .= "X-Attach: $attach"; > } > > > but it doesn't work.i miss something. > > szparag > > -- > 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!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail + regex + somethoughts
On Thursday 03 July 2003 19:18, Shivanischal A wrote: > I believe very much in the spirit of mailing lists and will never commit > any undesirable activity. I'm not saying that you have been committing any undesirable acts -- and AFAIK you haven't -- yet ;-) > I got the idea is when i browsed thru the Usenet Discussion Forums using > Google's web-interface to the Usenet. If u go their site, u can see this. > The UI look very cluttered with the previous posts appearing along with > newer posts (as part of same message). Like I said it is *your* responsibility to trim posts, your mail client (or whatever you're using) isn't going to do it for you (not in any sensible fashion anyway because the technology just isn't there yet). So again ... > > And what's wrong with doing to what the rest of us do -- that is, remove > > the unnecessary parts of the previous post and adding your comments > > underneath the parts of the previous post that you are commenting on? > I thought it would have been good if > someone/something took care to remove the earlier posts even if the person > posting it forgets to do so. Most of the time you don't want to completely remove the previous post(s) from your reply, Sensible use of quoting helps the flow of the discussion so that people can jump in in the middle of a thread and still have some idea of what the thread is about. -- 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 -- /* Q: What's the difference between USL and the Titanic? A: The Titanic had a band. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail + regex + somethoughts
Hi Jason, I believe very much in the spirit of mailing lists and will never commit any undesirable activity. I got the idea is when i browsed thru the Usenet Discussion Forums using Google's web-interface to the Usenet. If u go their site, u can see this. The UI look very cluttered with the previous posts appearing along with newer posts (as part of same message). I thought it would have been good if someone/something took care to remove the earlier posts even if the person posting it forgets to do so. If this is still confusing you, its probably my English. But i'm convinced this is difficult. Anyway, thanks for ur timeRegards, -shiva - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> Newsgroups: php.general To: <[EMAIL PROTECTED]> Sent: Thursday, July 03, 2003 3:38 PM Subject: Re: [PHP] Re: mail + regex + somethoughts > On Thursday 03 July 2003 16:37, Shivanischal A wrote: > > Hi Edwin, > > > > Let me restate my question... > > > > I'm now replying to ur mail. I've left ur message to me untouched. > > (whatever follows '- Original Message - '). What i want is that > > some SERVER-SIDE SCRIPT should be able to identify these original messages > > and remove them before storing the actual responses. > > > > I'm sorry for the confusion arising coz of incorrect statement. > > Either you're seriously confused or you're doing your best to confuse us. > > First, what has this got to do with PHP? > > Looking at your headers it seems you're using MS Outlook (no comments), how > are you going to interface that with PHP? Or how are you going to integrate > any typical MUA with PHP for that matter? > > And what's wrong with doing to what the rest of us do -- that is, remove the > unnecessary parts of the previous post and adding your comments underneath > the parts of the previous post that you are commenting on? > > -- > 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 > -- > /* > Breaking Windows isn't just for kids anymore... > */ > - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> Newsgroups: php.general To: <[EMAIL PROTECTED]> Sent: Thursday, July 03, 2003 3:38 PM Subject: Re: [PHP] Re: mail + regex + somethoughts > On Thursday 03 July 2003 16:37, Shivanischal A wrote: > > Hi Edwin, > > > > Let me restate my question... > > > > I'm now replying to ur mail. I've left ur message to me untouched. > > (whatever follows '- Original Message - '). What i want is that > > some SERVER-SIDE SCRIPT should be able to identify these original messages > > and remove them before storing the actual responses. > > > > I'm sorry for the confusion arising coz of incorrect statement. > > Either you're seriously confused or you're doing your best to confuse us. > > First, what has this got to do with PHP? > > Looking at your headers it seems you're using MS Outlook (no comments), how > are you going to interface that with PHP? Or how are you going to integrate > any typical MUA with PHP for that matter? > > And what's wrong with doing to what the rest of us do -- that is, remove the > unnecessary parts of the previous post and adding your comments underneath > the parts of the previous post that you are commenting on? > > -- > 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 > -- > /* > Breaking Windows isn't just for kids anymore... > */ > DISCLAIMER: This email is bound by the terms and conditions described at http://www.subexgroup.com/mail-disclaimer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail + regex + somethoughts
maybe you dig a little bit deeper: take a look at rfc2045 and following. they describe the mime-type. there is also specified, how boundaries in multipart-messages are defined. ciao SVEN - Edwin - wrote: > Hello, > > "Shivanischal A" <[EMAIL PROTECTED]> wrote: > >> Hi Edwin, >> >> Let me restate my question... >> >> I'm now replying to ur mail. I've left ur message to me untouched. >> (whatever follows '- Original Message - '). What i want is >> that some SERVER-SIDE SCRIPT should be able to identify these >> original messages and remove them before storing the actual >> responses. > > Hmm... I'm not really sure if I understand this but... > First, NOT all "mail clients" will add this: > > - Original Message - > > to the original message. Besides, there are many ways how each > individual would quote the original message. So, writing a script > that would identify THE original messages would be, IMHO, next to > impossible... > > What is the purpose anyway? > > - E - > > ...[snip]... > __ > Do You Yahoo!? > Yahoo! BB is Broadband by Yahoo! > http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail + regex + somethoughts
On Thursday 03 July 2003 16:37, Shivanischal A wrote: > Hi Edwin, > > Let me restate my question... > > I'm now replying to ur mail. I've left ur message to me untouched. > (whatever follows '- Original Message - '). What i want is that > some SERVER-SIDE SCRIPT should be able to identify these original messages > and remove them before storing the actual responses. > > I'm sorry for the confusion arising coz of incorrect statement. Either you're seriously confused or you're doing your best to confuse us. First, what has this got to do with PHP? Looking at your headers it seems you're using MS Outlook (no comments), how are you going to interface that with PHP? Or how are you going to integrate any typical MUA with PHP for that matter? And what's wrong with doing to what the rest of us do -- that is, remove the unnecessary parts of the previous post and adding your comments underneath the parts of the previous post that you are commenting on? -- 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 -- /* Breaking Windows isn't just for kids anymore... */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail + regex + somethoughts
Hello, "Shivanischal A" <[EMAIL PROTECTED]> wrote: > Hi Edwin, > > Let me restate my question... > > I'm now replying to ur mail. I've left ur message to me untouched. (whatever > follows '- Original Message - '). What i want is that some > SERVER-SIDE SCRIPT should be able to identify these original messages and > remove them before storing the actual responses. Hmm... I'm not really sure if I understand this but... First, NOT all "mail clients" will add this: - Original Message - to the original message. Besides, there are many ways how each individual would quote the original message. So, writing a script that would identify THE original messages would be, IMHO, next to impossible... What is the purpose anyway? - E - ...[snip]... __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: MAIL( ) - Send mail using another SMTP
Something like this... Add the following into a .htaccess file for your domain(s) php_value SMTP smtp.yourhost.com On 6/21/03 7:51 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > how do you do this please explain
Re: [PHP] Re: mail() function & exchange
Hello, On 06/12/2003 02:32 PM, Diana wrote: I totally agree with your first sentence *grin*. Anyways, I won`t be able to use your class because my server is kind of "locked" in their network, meaning I don`t have the possibility to connect outside, only to their servers (NT servers). And as Exchange servers don`t use SMTP (meaning the whole protocol is NOT used, so your classes won`t help me), I`m not able to send mails at all. Only like he offered me to put an extra box in the network which will relay the mails from my linux server. That will do. Does anyone know about the way exchange servers work, mapi and mapisend? The only thing I found was how to program that in VB (and being able to talk to Exchange servers), but it seems like this is not possible for my penguin :) (VB on Linux??? sounds stupid) No, that will not work on Linux because you do not have COM object support, which is a Windows thing. -- Regards, Manuel Lemos just today I stumbled into the same problem. It is true, I got this answer from an expert: "Unfortunately this will not work. SMTP relaying is disabled on all the Exchange connector servers and a standard Exchange mailbox server does not support SMTP. The only way that you can send SMTP email from within our company is to use the Internal MailSweeper. And to allow this we need the IP Address of the box that will be sending the messages so that we can include it in the authenticated list. We have to have things set up this way for Security reasons. One other thing I should have mentioned. Outlook uses mapi to send on the Exchange servers. So we can use the mapisend command but I do not know if your application would support this. I think that this may also need a valid Outlook profile to work." I don`t understand that either, because I am trying to use my Linux server (inside my companys network) to deliver mails to the exchange server via sendmail. If anyone knows more about this topic, let me know.sorry that this obviously does not belong to a php list, but I deleted the original email & could not find the email address of the author of this topic :( I wonder about his expertise. Authentication was meant for security reasons. Anyway, you do no not need to relay in the company SMTP server unless outside access is blocked in some firewall. If you are using Linux, you just need to use the mail() function because it just uses sendmail by default. If you still have problems, just use the classes that I mentioned enabling direct delivery mode in the SMTP sending attributes. That does the same as sendmail but at least if it fails you can enable debugging to see what the SMTP protocol dialog reveals. --- Manuel Lemos <[EMAIL PROTECTED]> schrieb: > Hello, On 06/10/2003 04:44 PM, Matthias Wulkow wrote: a friend of mine is trying to set up an automated mailing function. The platform is Windows & he's using the last PHP release at this time. He asks me how to do it with Exchange, because it doesn't speak SMTP or not correctly? What is the matter? Is that true? But that's not really the question... could somebody point me to some documents where I could find out, what has to be done to make it work? I do not see what he means by not speaking SMTP correctly. Anyway, if it receives e-mail that you get, it also can relay messages that you send. I think in the worst case you need to authenticate. In that case you may want to try this class for composing and sending messages. It comes with a sub class for sending messages via SMTP that supports authentication. http://www.phpclasses.org/mimemessage You also need this class for the actual message delivery: http://www.phpclasses.org/smtpclass -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() function & exchange
Hi, my company set their server up not to talk SMTP (disabled all --> that guy told me), and my tries to connect or talk to any of their Exchange servers failed :( so he must be true. Got onto their NT servers though ;) All the company uses Outlook & Exchange, & they use mapi to talk to each other. If a manager can`t be in the network, he`s connected via VPN & uses Outlook as well. They`ve got a trust relationship between their NT servers & the Exchange ones, & lots of domains joined. As I said, I don`t have a clue of Exchange so correct me if something sounds strange. To your suggestions: of course that would be easy for me to tell them to set up a new box for me. They`ll do that. But who likes the easy way ;)? No, just my curiosity, maybe someone knows how the protocol or whatever these M$ servers use is working & I could try to implement that. Would make my project more portable inside the company (They plan to use it on other sites as well), so they wouldn`t have problems with setting up separate Internal Mailsweepers everytime :). Can you tellme more about : > You'd be fine using SMTP on a connector server. It > will relay the > mail to the appropriate mailbox server is that working even if SMTP is not enabled? The guy told me that SMTP is not enabled by default on Exchange servers and they didn`t change that! (that`s the reason for me to ask how that system works in the wholehow does outlook send the mail to the exchange server? Could it be that all the users just access something like a directory on the exchange server when starting their outlook (not a local program! & not working when the exchange server crashed ;)). Maybe that`s the LDAP part? Anyone enlighten me please.. by the way, a lot of people ask these questions see here http://www.phpbuilder.com/mail/php3-list/199908/0344.php http://www.linuxsa.org.au/mailing-list/2000-07/954.html http://www.faqts.com/knowledge_base/view.phtml/aid/13043/fid/21 > > I can't comment on how your company's Exchange > servers are > configured, but they absolutely *can* talk SMTP. We > are using a > web-based application that sends email notifications > through our > internal Exchange servers. > > Now, they can be set up with SMTP turned off, or so > that only certain > other hosts can relay through them (send mail), and > that might be > what he's talking about when he says the > "authenticated list". I > believe it's simply a list of hosts that are allowed > to relay through > the Exchange SMTP server. > > You'd be fine using SMTP on a connector server. It > will relay the > mail to the appropriate mailbox server (assuming > they've separate the > functions). > > Out of curiosity, why not give them the IP address > and let them add > the host to the authenticated sender list, as he > offered? Or did I > miss a part of the converation (very possible). > > > > __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() function & exchange
--- Diana <[EMAIL PROTECTED]> wrote: > I totally agree with your first sentence *grin*. > Anyways, I won`t be able to use your class because my > server is kind of "locked" in their network, meaning I > don`t have the possibility to connect outside, only to > their servers (NT servers). And as Exchange servers > don`t use SMTP (meaning the whole protocol is NOT > used, so your classes won`t help me), I`m not able to > send mails at all. Only like he offered me to put an > extra box in the network which will relay the mails > from my linux server. > Does anyone know about the way exchange servers work, > mapi and mapisend? The only thing I found was how to > program that in VB (and being able to talk to Exchange > servers), but it seems like this is not possible for > my penguin :) (VB on Linux??? sounds stupid) > I found in old archives of this mailinglist that some > people asked this question before (how to implement a > mail function for exchange servers in php) but no one > knew it. One hint was to use ldap. anyone any idea > about this? ANY help is appreciated, I will follow the > threads started about ldap but right now it does not > look like it has a lot to do with the mail stuff. > > Another hint might be the COM interface (I saw VB code > they used this) but php offers only very few things on > this and as I have no idea of microsofts concepts that > doesn`t help :( > > Please email me for suggestions!!! Wold be great to > implement something new in php ;). If anyone knows > documents about how outlook & exchange work I would > like to see them! Thanks :) > Diana I can't comment on how your company's Exchange servers are configured, but they absolutely *can* talk SMTP. We are using a web-based application that sends email notifications through our internal Exchange servers. Now, they can be set up with SMTP turned off, or so that only certain other hosts can relay through them (send mail), and that might be what he's talking about when he says the "authenticated list". I believe it's simply a list of hosts that are allowed to relay through the Exchange SMTP server. You'd be fine using SMTP on a connector server. It will relay the mail to the appropriate mailbox server (assuming they've separate the functions). Out of curiosity, why not give them the IP address and let them add the host to the authenticated sender list, as he offered? Or did I miss a part of the converation (very possible). > > > > --- Manuel Lemos <[EMAIL PROTECTED]> schrieb: > Hello, > > > > On 06/11/2003 05:38 PM, Diana wrote: > > > Hi, > > > just today I stumbled into the same problem. It is > > > true, I got this answer from an expert: > > > > > "Unfortunately this will not work. SMTP relaying > > is > > > disabled on all the > > > Exchange connector servers and a standard Exchange > > > mailbox server does > > > not > > > support SMTP. The only way that you can send SMTP > > > email from within > > > our company is to use the Internal MailSweeper. > > And > > > to allow this we need > > > the IP > > > Address of the box that will be sending the > > messages > > > so that we can > > > include > > > it in the authenticated list. We have to have > > things > > > set up this way > > > for > > > Security reasons. > > > > > > One other thing I should have mentioned. Outlook > > uses > > > mapi to send on > > > the > > > Exchange servers. So we can use the mapisend > > command > > > but I do not know > > > if > > > your application would support this. I think that > > > this may also need a > > > valid Outlook profile to work." > > > > > > > > > I don`t understand that either, because I am > > trying to > > > use my Linux server (inside my companys network) > > to > > > deliver mails to the exchange server via sendmail. > > > > > If anyone knows more about this topic, let me > > > know.sorry that this obviously does not belong > > to > > > a php list, but I deleted the original email & > > could > > > not find the email address of the author of this > > topic > > > :( > > > > I wonder about his expertise. Authentication was > > meant for security reasons. > > > > Anyway, you do no not need to relay in the company > > SMTP server unless > > outside access is blocked in some firewall. > > > > If you are using Linux, you just need to use the > > mail() function because > > it just uses sendmail by default. > > > > If you still have problems, just use the classes > > that I mentioned > > enabling direct delivery mode in the SMTP sending > > attributes. That does > > the same as sendmail but at least if it fails you > > can enable debugging > > to see what the SMTP protocol dialog reveals. > > > > > > > > > --- Manuel Lemos <[EMAIL PROTECTED]> schrieb: > > > Hello, > > > > > >>On 06/10/2003 04:44 PM, Matthias Wulkow wrote: > > >> > > >>>a friend of mine is trying to set up an automated > > >> > > >>mailing function. > > >> > > >>>The platform is Windows & he's using the last PHP >
Re: [PHP] Re: mail() function & exchange
I totally agree with your first sentence *grin*. Anyways, I won`t be able to use your class because my server is kind of "locked" in their network, meaning I don`t have the possibility to connect outside, only to their servers (NT servers). And as Exchange servers don`t use SMTP (meaning the whole protocol is NOT used, so your classes won`t help me), I`m not able to send mails at all. Only like he offered me to put an extra box in the network which will relay the mails from my linux server. Does anyone know about the way exchange servers work, mapi and mapisend? The only thing I found was how to program that in VB (and being able to talk to Exchange servers), but it seems like this is not possible for my penguin :) (VB on Linux??? sounds stupid) I found in old archives of this mailinglist that some people asked this question before (how to implement a mail function for exchange servers in php) but no one knew it. One hint was to use ldap. anyone any idea about this? ANY help is appreciated, I will follow the threads started about ldap but right now it does not look like it has a lot to do with the mail stuff. Another hint might be the COM interface (I saw VB code they used this) but php offers only very few things on this and as I have no idea of microsofts concepts that doesn`t help :( Please email me for suggestions!!! Wold be great to implement something new in php ;). If anyone knows documents about how outlook & exchange work I would like to see them! Thanks :) Diana --- Manuel Lemos <[EMAIL PROTECTED]> schrieb: > Hello, > > On 06/11/2003 05:38 PM, Diana wrote: > > Hi, > > just today I stumbled into the same problem. It is > > true, I got this answer from an expert: > > > "Unfortunately this will not work. SMTP relaying > is > > disabled on all the > > Exchange connector servers and a standard Exchange > > mailbox server does > > not > > support SMTP. The only way that you can send SMTP > > email from within > > our company is to use the Internal MailSweeper. > And > > to allow this we need > > the IP > > Address of the box that will be sending the > messages > > so that we can > > include > > it in the authenticated list. We have to have > things > > set up this way > > for > > Security reasons. > > > > One other thing I should have mentioned. Outlook > uses > > mapi to send on > > the > > Exchange servers. So we can use the mapisend > command > > but I do not know > > if > > your application would support this. I think that > > this may also need a > > valid Outlook profile to work." > > > > > > I don`t understand that either, because I am > trying to > > use my Linux server (inside my companys network) > to > > deliver mails to the exchange server via sendmail. > > > If anyone knows more about this topic, let me > > know.sorry that this obviously does not belong > to > > a php list, but I deleted the original email & > could > > not find the email address of the author of this > topic > > :( > > I wonder about his expertise. Authentication was > meant for security reasons. > > Anyway, you do no not need to relay in the company > SMTP server unless > outside access is blocked in some firewall. > > If you are using Linux, you just need to use the > mail() function because > it just uses sendmail by default. > > If you still have problems, just use the classes > that I mentioned > enabling direct delivery mode in the SMTP sending > attributes. That does > the same as sendmail but at least if it fails you > can enable debugging > to see what the SMTP protocol dialog reveals. > > > > > --- Manuel Lemos <[EMAIL PROTECTED]> schrieb: > > Hello, > > > >>On 06/10/2003 04:44 PM, Matthias Wulkow wrote: > >> > >>>a friend of mine is trying to set up an automated > >> > >>mailing function. > >> > >>>The platform is Windows & he's using the last PHP > >> > >>release at this > >> > >>>time. > >>>He asks me how to do it with Exchange, because it > >> > >>doesn't speak SMTP > >> > >>>or not correctly? What is the matter? Is that > >> > >>true? But that's not > >> > >>>really the question... could somebody point me to > >> > >>some documents where > >> > >>>I could find out, what has to be done to make it > >> > >>work? > >> > >>I do not see what he means by not speaking SMTP > >>correctly. Anyway, if it > >>receives e-mail that you get, it also can relay > >>messages that you send. > >>I think in the worst case you need to > authenticate. > >> > >>In that case you may want to try this class for > >>composing and sending > >>messages. It comes with a sub class for sending > >>messages via SMTP that > >>supports authentication. > >> > >>http://www.phpclasses.org/mimemessage > >> > >>You also need this class for the actual message > >>delivery: > >> > >>http://www.phpclasses.org/smtpclass __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de -- PH
Re: [PHP] Re: mail() function & exchange
Hello, On 06/11/2003 05:38 PM, Diana wrote: Hi, just today I stumbled into the same problem. It is true, I got this answer from an expert: "Unfortunately this will not work. SMTP relaying is disabled on all the Exchange connector servers and a standard Exchange mailbox server does not support SMTP. The only way that you can send SMTP email from within our company is to use the Internal MailSweeper. And to allow this we need the IP Address of the box that will be sending the messages so that we can include it in the authenticated list. We have to have things set up this way for Security reasons. One other thing I should have mentioned. Outlook uses mapi to send on the Exchange servers. So we can use the mapisend command but I do not know if your application would support this. I think that this may also need a valid Outlook profile to work." I don`t understand that either, because I am trying to use my Linux server (inside my companys network) to deliver mails to the exchange server via sendmail. If anyone knows more about this topic, let me know.sorry that this obviously does not belong to a php list, but I deleted the original email & could not find the email address of the author of this topic :( I wonder about his expertise. Authentication was meant for security reasons. Anyway, you do no not need to relay in the company SMTP server unless outside access is blocked in some firewall. If you are using Linux, you just need to use the mail() function because it just uses sendmail by default. If you still have problems, just use the classes that I mentioned enabling direct delivery mode in the SMTP sending attributes. That does the same as sendmail but at least if it fails you can enable debugging to see what the SMTP protocol dialog reveals. --- Manuel Lemos <[EMAIL PROTECTED]> schrieb: > Hello, On 06/10/2003 04:44 PM, Matthias Wulkow wrote: a friend of mine is trying to set up an automated mailing function. The platform is Windows & he's using the last PHP release at this time. He asks me how to do it with Exchange, because it doesn't speak SMTP or not correctly? What is the matter? Is that true? But that's not really the question... could somebody point me to some documents where I could find out, what has to be done to make it work? I do not see what he means by not speaking SMTP correctly. Anyway, if it receives e-mail that you get, it also can relay messages that you send. I think in the worst case you need to authenticate. In that case you may want to try this class for composing and sending messages. It comes with a sub class for sending messages via SMTP that supports authentication. http://www.phpclasses.org/mimemessage You also need this class for the actual message delivery: http://www.phpclasses.org/smtpclass -- Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() function & exchange
Hi, just today I stumbled into the same problem. It is true, I got this answer from an expert: "Unfortunately this will not work. SMTP relaying is disabled on all the Exchange connector servers and a standard Exchange mailbox server does not support SMTP. The only way that you can send SMTP email from within our company is to use the Internal MailSweeper. And to allow this we need the IP Address of the box that will be sending the messages so that we can include it in the authenticated list. We have to have things set up this way for Security reasons. One other thing I should have mentioned. Outlook uses mapi to send on the Exchange servers. So we can use the mapisend command but I do not know if your application would support this. I think that this may also need a valid Outlook profile to work." I don`t understand that either, because I am trying to use my Linux server (inside my companys network) to deliver mails to the exchange server via sendmail. If anyone knows more about this topic, let me know.sorry that this obviously does not belong to a php list, but I deleted the original email & could not find the email address of the author of this topic :( --- Manuel Lemos <[EMAIL PROTECTED]> schrieb: > Hello, > > On 06/10/2003 04:44 PM, Matthias Wulkow wrote: > > a friend of mine is trying to set up an automated > mailing function. > > The platform is Windows & he's using the last PHP > release at this > > time. > > He asks me how to do it with Exchange, because it > doesn't speak SMTP > > or not correctly? What is the matter? Is that > true? But that's not > > really the question... could somebody point me to > some documents where > > I could find out, what has to be done to make it > work? > > I do not see what he means by not speaking SMTP > correctly. Anyway, if it > receives e-mail that you get, it also can relay > messages that you send. > I think in the worst case you need to authenticate. > > In that case you may want to try this class for > composing and sending > messages. It comes with a sub class for sending > messages via SMTP that > supports authentication. > > http://www.phpclasses.org/mimemessage > > You also need this class for the actual message > delivery: > > http://www.phpclasses.org/smtpclass > > -- > > Regards, > Manuel Lemos > > 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 > = WHEN ALL ELSE FAILS, HUG YOUR SNOOPY Those who bring sunshine to the lives of others cannot keep it from themselves. J.M. Barrie (1860-1937) __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: mail() function
Not strictly true, the mail function will send to multiple email addresses separated by a comma, you can also cc and bcc by using headers. See the manual, which has some good examples of this. Mark -Original Message- From: Patrick Schnegg [mailto:[EMAIL PROTECTED] Sent: 04 March 2003 13:14 To: [EMAIL PROTECTED] Subject: [PHP] Re: mail() function The mail() function will only send one mail at a time, to send multiple mails you would write a loop like this (presuming you had your mail addresses ready in an array called $emails): foreach ($emails as $email) { mail($email, "your subject", "your message"); } "Denis L. Menezes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hello friends, Can the mail() function send emails to multiple addresses which are formatted as follows : [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] etc with a comma or a semicolon between them? Thanks Denis -- 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] Re: mail() function
Oh, silly me. Commas are indeed accepted. My apologies. - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> Newsgroups: php.general To: <[EMAIL PROTECTED]> Sent: Tuesday, March 04, 2003 2:18 PM Subject: Re: [PHP] Re: mail() function > On Tuesday 04 March 2003 21:13, Patrick Schnegg wrote: > > The mail() function will only send one mail at a time, to send multiple > > mails you would write a loop like this (presuming you had your mail > > addresses ready in an array called $emails): > > > > foreach ($emails as $email) { > > mail($email, "your subject", "your message"); > > } > > > > "Denis L. Menezes" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > Hello friends, > > > > Can the mail() function send emails to multiple addresses which are > > formatted as follows : > > > > [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] etc with a > > comma or a semicolon between them? > > Denis, Patrick, both of you take a look at the example in the manual. > > -- > 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 > -- > /* > Having the fewest wants, I am nearest to the gods. > -- Socrates > */ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() function
On Tuesday 04 March 2003 21:13, Patrick Schnegg wrote: > The mail() function will only send one mail at a time, to send multiple > mails you would write a loop like this (presuming you had your mail > addresses ready in an array called $emails): > > foreach ($emails as $email) { > mail($email, "your subject", "your message"); > } > > "Denis L. Menezes" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > Hello friends, > > Can the mail() function send emails to multiple addresses which are > formatted as follows : > > [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] etc with a > comma or a semicolon between them? Denis, Patrick, both of you take a look at the example in the manual. -- 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 -- /* Having the fewest wants, I am nearest to the gods. -- Socrates */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mail (), BBC: recipients not receiving my Newsletter
Hello, On 02/27/2003 02:22 PM, Ricardo Fitzgerald wrote: I've dl your class and read some of your test scripts, but it's not working at all I tested using test_personalized_bulk_mail.php And I got :'Error: it was not possible to send email message' You most likely have a PHP configuration problem. It is hard to tell before you describe your system. Is it Windows or Unix/Linux? What do you have configured in the php.ini file. Anyway, if you are using Windows, which is my guess, you need to send the message via an SMTP server. If you have it configured to send via a working SMTP server, you may be having one of many types problems that can only be cleared with the some information about that error. In that case, try using in the script of that class named test_smtp_message.php changing it to use your SMTP server and set the smtp_debug variable to 1 so you can see the dialog with the SMTP server. That should help figuring what is your problem. -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Mail (), BBC: recipients not receiving my Newsletter
Hi Manuel, I've dl your class and read some of your test scripts, but it's not working at all I tested using test_personalized_bulk_mail.php And I got :'Error: it was not possible to send email message' Thank you, Rick Off Price Closeouts 1700 W 8 Ave Miami, FL 33010 (305) 888 2555 FAX (305) 884 1761 -Mensaje original- De: Manuel Lemos [mailto:[EMAIL PROTECTED] Enviado el: Wednesday, February 26, 2003 11:35 PM Para: [EMAIL PROTECTED] Asunto: [PHP] Re: Mail (), BBC: recipients not receiving my Newsletter Hello, On 02/26/2003 07:40 PM, Ricardo Fitzgerald wrote: > I wrote a small form which dumps data to a php script that uses mail () > to send an html newsletter, so far is working except > that it's not sending to BCC: headers, in my form I have a field to > enter a comma delimited email list, after submiting the form this list > is stored under one variable $emaillist, and in my php script I used > $headers .= "Bcc: ".$emaillist."\r\n"; > > then I call > > mail($to, $subject, $message, $headers); > > I don't receive an error message but my email list is not being sent, > what I'm doing wrong ? It sounds like one of those bugs of the mail function but it is hard to tell what can it be with so little information. Anyway, you may want to try this class for composing and sending e-mail messages that comes with workaround for many problems of the mail() function: 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail() not working on Win2k
Hello, On 01/06/2003 08:46 PM, Rad Craig wrote: I can't use that as the program that I need for the email to work with, I don't have access to it's mail() function...yet. As I explained, the class comes with a wrapper function named smtp_mail() that emulates mail() function (but without the bugs). All you need to do is to replace mail() calls by smtp_mail() calls including smtp_mail.php where needed. Even if you do not want to replace anything, you can still try the class test scripts to see if it works for you. If it doesn't, it will provide helpful error messages unlike the mail() function. Now it is up to you if you want to progress in solving your problem. Regards, Manuel Lemos -Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 4:28 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: mail() not working on Win2k Hello, On 01/06/2003 01:21 PM, Rad Craig wrote: I'm running under Win2k, new install of PHP(last week), I have been trying to test the mail() function, but it doesn't seem to work. I host my own mail server on the same machine and I know it works, has been for months, all other mail come/goes just fine. I don't have the default SMTP server for IIS installed since I have my own SMTP/POP3 mail server on this same server. I have tried it with the following: mail("[EMAIL PROTECTED]", "test message", "this is a test"); I have SMTP authentication turned off on my mail server for this testing. It never arrives, I never get an error. I can telnet to port 25, all works fine. phpinfo.php reports that everything looks good, only thing i saw was that the extension directory shows c:\php4 instead of c:\php. I don't have any extra .dll's or anything turned on since it has built-in support for MySQL. Have you tried this alternative as I suggested in this other message to you? Many people solved their problem with it, so can you. http://news.php.net/article.php?group=php.general&article=130351 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: mail() not working on Win2k
I can't use that as the program that I need for the email to work with, I don't have access to it's mail() function...yet. Rad... > -Original Message- > From: Manuel Lemos [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 06, 2003 4:28 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Re: mail() not working on Win2k > > > Hello, > > On 01/06/2003 01:21 PM, Rad Craig wrote: > > I'm running under Win2k, new install of PHP(last week), I have > been trying > > to test the mail() function, but it doesn't seem to work. I host my own > > mail server on the same machine and I know it works, has been > for months, > > all other mail come/goes just fine. I don't have the default > SMTP server > > for IIS installed since I have my own SMTP/POP3 mail server on this same > > server. > > > > I have tried it with the following: > > mail("[EMAIL PROTECTED]", "test message", "this is a test"); > > > > I have SMTP authentication turned off on my mail server for > this testing. > > > > It never arrives, I never get an error. > > > > I can telnet to port 25, all works fine. > > > > phpinfo.php reports that everything looks good, only thing i > saw was that > > the extension directory shows c:\php4 instead of c:\php. > > > > I don't have any extra .dll's or anything turned on since it > has built-in > > support for MySQL. > > Have you tried this alternative as I suggested in this other message to > you? Many people solved their problem with it, so can you. > > http://news.php.net/article.php?group=php.general&article=130351 > > > -- > > Regards, > Manuel Lemos > > > -- > 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] Re: mail()
Yeah, is the best alternative. On Fri, 20 Dec 2002, John W. Holmes wrote: > > I changed this and it works fine but I now lose my formating. It > doesn't > > seem to recognize the \n breaks. Am I asking for to much? > > Well, you'll be required to learn HTML if you're going to send HTML > emails. Use . > > ---John W. Holmes... > > PHP Architect - A monthly magazine for PHP Professionals. Get your copy > today. http://www.phparch.com/ > > > > -- > 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] Re: mail()
> I changed this and it works fine but I now lose my formating. It doesn't > seem to recognize the \n breaks. Am I asking for to much? Well, you'll be required to learn HTML if you're going to send HTML emails. Use . ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail()
Hi, if you use plain text use "\n", elseif you use text/html use "" (and all the other html-tags) HTH, Bastian Edward Peloke schrieb: > Can I still keep the formatting? When I added the Content-type: text/html > to the header last night, the link worked but my formatting did not. > Everything was just a long string. > > Thanks, > Eddie > > -Original Message- > From: Rick Emery [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 20, 2002 9:07 AM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Re: mail() > > that should be: > http://www.aircharterunited.com\pages\activate_account.php?clientid=$uname > > (Grrr...that's what I get for using copy/paste from original email) > > - Original Message - > From: "Rick Emery" <[EMAIL PROTECTED]> > To: "Edward Peloke" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Friday, December 20, 2002 8:04 AM > Subject: Re: [PHP] Re: mail() > > Actually, you don't need to send this as an html hyperlink. Simply > using: > http:\\www.aircharterunited.com\pages\activate_account.php?clientid=$uname > > Should work; it does for me. > > ----- Original Message - > From: "Edward Peloke" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, December 20, 2002 8:18 AM > Subject: RE: [PHP] Re: mail() > > I changed this and it works fine but I now lose my formating. It doesn't > seem to recognize the \n breaks. Am I asking for to much? > > -Original Message- > From: Mike Mannakee [mailto:[EMAIL PROTECTED]] > Sent: Thursday, December 19, 2002 8:51 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Re: mail() > > You need to set the correct header type: > > Content-type: text/html > > otherwise it defaults to: > > Content-type: text/plain > > Mike > > "Edward Peloke" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hello all, > > > > I am using the following code but when I view the sent e-mail (in my yahoo > > account) the link info is all plain text. I see the everything. > > How do I create it as a link? I know I can send them because I have done > it > > before in my yahoo e-mail, just never through php and mail(). > > > > Thanks, > > Eddie > > > > $mailcontent="Thank you for registering with AirCharterUnited \n" > > ."Your Username is $uname and your password is $pword > > \n" > > ."Please click the following link to activate your > > account \n" > >." > > href='http:\\www.aircharterunited.com\pages\activate_account.php?clientid=$u > > name'>Activate Account"; > >mail($email,'Thanks',$mailcontent,"From: > > aircharterunited.com"); > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > 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] Re: mail()
Can I still keep the formatting? When I added the Content-type: text/html to the header last night, the link worked but my formatting did not. Everything was just a long string. Thanks, Eddie -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Friday, December 20, 2002 9:07 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: mail() that should be: http://www.aircharterunited.com\pages\activate_account.php?clientid=$uname (Grrr...that's what I get for using copy/paste from original email) - Original Message - From: "Rick Emery" <[EMAIL PROTECTED]> To: "Edward Peloke" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, December 20, 2002 8:04 AM Subject: Re: [PHP] Re: mail() Actually, you don't need to send this as an html hyperlink. Simply using: http:\\www.aircharterunited.com\pages\activate_account.php?clientid=$uname Should work; it does for me. - Original Message - From: "Edward Peloke" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, December 20, 2002 8:18 AM Subject: RE: [PHP] Re: mail() I changed this and it works fine but I now lose my formating. It doesn't seem to recognize the \n breaks. Am I asking for to much? -Original Message- From: Mike Mannakee [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 8:51 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: mail() You need to set the correct header type: Content-type: text/html otherwise it defaults to: Content-type: text/plain Mike "Edward Peloke" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello all, > > I am using the following code but when I view the sent e-mail (in my yahoo > account) the link info is all plain text. I see the How do I create it as a link? I know I can send them because I have done it > before in my yahoo e-mail, just never through php and mail(). > > Thanks, > Eddie > > $mailcontent="Thank you for registering with AirCharterUnited \n" > ."Your Username is $uname and your password is $pword > \n" > ."Please click the following link to activate your > account \n" >." href='http:\\www.aircharterunited.com\pages\activate_account.php?clientid=$u > name'>Activate Account"; >mail($email,'Thanks',$mailcontent,"From: > aircharterunited.com"); > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- 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] Re: mail()
that should be: http://www.aircharterunited.com\pages\activate_account.php?clientid=$uname (Grrr...that's what I get for using copy/paste from original email) - Original Message - From: "Rick Emery" <[EMAIL PROTECTED]> To: "Edward Peloke" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, December 20, 2002 8:04 AM Subject: Re: [PHP] Re: mail() Actually, you don't need to send this as an html hyperlink. Simply using: http:\\www.aircharterunited.com\pages\activate_account.php?clientid=$uname Should work; it does for me. - Original Message - From: "Edward Peloke" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, December 20, 2002 8:18 AM Subject: RE: [PHP] Re: mail() I changed this and it works fine but I now lose my formating. It doesn't seem to recognize the \n breaks. Am I asking for to much? -Original Message- From: Mike Mannakee [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 8:51 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: mail() You need to set the correct header type: Content-type: text/html otherwise it defaults to: Content-type: text/plain Mike "Edward Peloke" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello all, > > I am using the following code but when I view the sent e-mail (in my yahoo > account) the link info is all plain text. I see the How do I create it as a link? I know I can send them because I have done it > before in my yahoo e-mail, just never through php and mail(). > > Thanks, > Eddie > > $mailcontent="Thank you for registering with AirCharterUnited \n" > ."Your Username is $uname and your password is $pword > \n" > ."Please click the following link to activate your > account \n" >." href='http:\\www.aircharterunited.com\pages\activate_account.php?clientid=$u > name'>Activate Account"; >mail($email,'Thanks',$mailcontent,"From: > aircharterunited.com"); > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail()
Actually, you don't need to send this as an html hyperlink. Simply using: http:\\www.aircharterunited.com\pages\activate_account.php?clientid=$uname Should work; it does for me. - Original Message - From: "Edward Peloke" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, December 20, 2002 8:18 AM Subject: RE: [PHP] Re: mail() I changed this and it works fine but I now lose my formating. It doesn't seem to recognize the \n breaks. Am I asking for to much? -Original Message- From: Mike Mannakee [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 8:51 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: mail() You need to set the correct header type: Content-type: text/html otherwise it defaults to: Content-type: text/plain Mike "Edward Peloke" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello all, > > I am using the following code but when I view the sent e-mail (in my yahoo > account) the link info is all plain text. I see the How do I create it as a link? I know I can send them because I have done it > before in my yahoo e-mail, just never through php and mail(). > > Thanks, > Eddie > > $mailcontent="Thank you for registering with AirCharterUnited \n" > ."Your Username is $uname and your password is $pword > \n" > ."Please click the following link to activate your > account \n" >." href='http:\\www.aircharterunited.com\pages\activate_account.php?clientid=$u > name'>Activate Account"; >mail($email,'Thanks',$mailcontent,"From: > aircharterunited.com"); > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: mail()
I changed this and it works fine but I now lose my formating. It doesn't seem to recognize the \n breaks. Am I asking for to much? -Original Message- From: Mike Mannakee [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 8:51 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: mail() You need to set the correct header type: Content-type: text/html otherwise it defaults to: Content-type: text/plain Mike "Edward Peloke" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello all, > > I am using the following code but when I view the sent e-mail (in my yahoo > account) the link info is all plain text. I see the How do I create it as a link? I know I can send them because I have done it > before in my yahoo e-mail, just never through php and mail(). > > Thanks, > Eddie > > $mailcontent="Thank you for registering with AirCharterUnited \n" > ."Your Username is $uname and your password is $pword > \n" > ."Please click the following link to activate your > account \n" >." href='http:\\www.aircharterunited.com\pages\activate_account.php?clientid=$u > name'>Activate Account"; >mail($email,'Thanks',$mailcontent,"From: > aircharterunited.com"); > -- 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] Re: mail()
Thanks all! I will give this a shot! -Original Message- From: Mike Mannakee [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 8:51 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: mail() You need to set the correct header type: Content-type: text/html otherwise it defaults to: Content-type: text/plain Mike "Edward Peloke" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello all, > > I am using the following code but when I view the sent e-mail (in my yahoo > account) the link info is all plain text. I see the How do I create it as a link? I know I can send them because I have done it > before in my yahoo e-mail, just never through php and mail(). > > Thanks, > Eddie > > $mailcontent="Thank you for registering with AirCharterUnited \n" > ."Your Username is $uname and your password is $pword > \n" > ."Please click the following link to activate your > account \n" >." href='http:\\www.aircharterunited.com\pages\activate_account.php?clientid=$u > name'>Activate Account"; >mail($email,'Thanks',$mailcontent,"From: > aircharterunited.com"); > -- 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] Re: Mail() Not working right
Miguel González Castaños wrote: I am testing the php mail function with the typical script $mailsuccess = mail(...); if (!$mailsuccess) { echo "Mail could not be sent"; } In one redhat linux box I got that the email was sent succesfully and in the other box, it cant send it, but the script is executed (no parse errors). I have sendmail 8.11-2 and php 4.1.2. As i have said in my other email, I have checked if I have set properly the nobody privileges to execute sendmail and set the smtp and sendmail_path variables in the php.ini. Do you know how I could figure out what is going on? Any way of debugging or testing? What does the mail log say? Its usually /var/log/maillog. You say that the email is not sent, but what error message do you get? I think we need to know a little more about the error. HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mail() Not working right
Dear all, Sorry for my English...I am not a native speaker... I am experiencing the same problem with the mail function. I am using exactly the same test php script to test the PHP mail function. I have two RedHat linux boxes. In one box, the PHP mail function work and in the other one doesnt work. In both using sendmail command line work fine. I have checked the maillogs and I only can see any maillog in the one that PHP mail function works. In both I have set SMTP like localhost, sendmail_path=/usr/sbin/sendmail -t besides I have double checked the permissions for the nobody user to either execute the php script or the sendmail command. Could it be an issue of either the PHP version or the sendmail version? How could I use PHP logs or whatever tool to check what is going on? Many thanks in advance and sorry if this is considered a lame question Miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mail() Not working right
I actaully already wrote one like that. The PHP is going fine, the problem I believe is PHP interfacing with my mail server. Thanks though Steve Yates wrote: "Tom Culpepper" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... while I get no PHP errors the mail is never sent. mail("[EMAIL PROTECTED]", "testing 1234", "this is a test message"); I don't think this shows an error if it doesn't work. Try $mailsuccess = mail(...); if (!$mailsuccess) { echo "oops"; } - Steve Yates - How often should we practice sex before it is safe? ~ Taglines by Taglinator - www.srtware.com ~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail headers & filtering
"Ah, so this is happening on another server. " Both - mine and others. "Does that server send emails OK other than by your script?" Others - not known - the reason they use the generator (mostly) is because they dont know how to write the code themselves. But their webserver is running PHP and they have no reason to believe that it will not work. They say there is no error but I know that display errors is probably off. "Are you using the mail() function or Manuel Lemos's classes and do you check the return value in your script to show whether it was delivered OK." mail() function - I am going to look at Manuels classes today. on the signup page to use the generator (where I sometimes have non-receipt of confirmation mail by user probs) - yes I check the return value on the generated scripts used on other peoples servers - no - I will change that for the next version of the generator re testing "From your server or theirs?" Using my server "Check the logs of the server configured in php.ini to send the email (assuming you are using the emails services of the computer on which the php script is run)." Dont think they will have access to these logs (most of them - me too - are running on providers servers not their own) "Have you got "Return-Path" configured in all cases. The bounce messsage you posted would have been sent to you via this header." my signup page - no - I have configured reply-to instead which I thought was sufficient - I will change that generated scripts - no - I will change that for the next version I need to change a few things I can see that. At least now I will have more chance of finding out why and when I get complaints about non-receipt of emails I am better informed and in a better position to answer. Thank you very much for your help Chris. Debbie - Original Message - From: "Chris Hewitt" <[EMAIL PROTECTED]> To: "Debbie Dyer" <[EMAIL PROTECTED]> Sent: Tuesday, October 01, 2002 10:56 AM Subject: Re: [PHP] Re: mail headers & filtering > Debbie Dyer wrote: > > >Hi Chris > > > >They are having the problem receiving the mail sent by the script not > >sending. > >They go to my site and generate a form mailer using their email ad > >They upload it to their webserver > >Then they email me saying that they are testing the mailer out on their site > >and it seems to work but they never receive the email that it sends > > > Ah, so this is happening on another server. Does that server send emails > OK other than by your script? Are you using the mail() function or > Manuel Lemos's classes and do you check the return value in your script > to show whether it was delivered OK. I suspect you don't. > > > > >Always when I test the scripts (with my email ad) there is nothing wrong > >with it and I receive the mail > > > From your server or theirs? > > >So I don't know what to tell them apart from it must be filtering, nor do I > > > Check the logs of the server configured in php.ini to send the email > (assuming you are using the emails services of the computer on which the > php script is run). If a linux box then its usually in the file > /var/log/maillog. There will be information in there as to whether the > email was sent without error. The sending will be to the recipient's > mail host or dns MX record. The logs will indicate whether it got there > without error or not. Whether the user can pick up mail from their mail > host is another matter and not reported. At a minimun, the domain the > email is originating from should be in both forward and reverse dns. > > > > >know how to attempt to fix the problem. Maybe this problem of 'lost mail' is > >more noticeable to me because a few hundred a week use this generator so we > >are talking about running these scripts on a lot of different websites using > >a lot of different mailservers/mailboxes. > > > Yes, quite possibly. smtp does not (I don't think) guarantee delivery > but you should get either a MAILER_DAEMON bounce message to the address > you configure in the "Return-Path" header or a line in the smtp server > log to say why it has not been sent without error. Have you got > "Return-Path" configured in all cases. The bounce messsage you posted > would have been sent to you via this header. > > > > >>From now on when I get these complaints I will ask them for the name of the > >mailserver that sends the mail - maybe then I can get back to you for some > >tests. > > > Yes, good idea. Check it is in both forward and reverse dns. > > Regards > > Chris > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail headers & filtering
Hi Chris They are having the problem receiving the mail sent by the script not sending. They go to my site and generate a form mailer using their email ad They upload it to their webserver Then they email me saying that they are testing the mailer out on their site and it seems to work but they never receive the email that it sends Always when I test the scripts (with my email ad) there is nothing wrong with it and I receive the mail So I don't know what to tell them apart from it must be filtering, nor do I know how to attempt to fix the problem. Maybe this problem of 'lost mail' is more noticeable to me because a few hundred a week use this generator so we are talking about running these scripts on a lot of different websites using a lot of different mailservers/mailboxes. >From now on when I get these complaints I will ask them for the name of the mailserver that sends the mail - maybe then I can get back to you for some tests. Thanks Debbie - Original Message - From: "Chris Hewitt" <[EMAIL PROTECTED]> To: "Debbie Dyer" <[EMAIL PROTECTED]> Sent: Tuesday, October 01, 2002 8:48 AM Subject: Re: [PHP] Re: mail headers & filtering > Debbie Dyer wrote: > > >I was talking about my second prob.. > > > Debbie, > > I had not read your post well enough. Yes, if customers are sometimes > having a similar problem when they are sending email then it could be > their domain is not in dns. > > If I can help in a test, perhaps forwarding an email from you to an > address you can't get through to directly, I'm happy to help. It will > aid checking whether dns is the issue. > > I've only ever had one refusal to recieve email (except when the user no > longer has the account) and that was when I sent an attachment that was > a windows executable (.exe) file. Changing the extension to ".zip" and > it went through. Not having had the problem, I disagree with you > statement that email seems unreliable these days. So there must be > something different with the setups we have that accounts for it. DNS is > the only difference I can think of. > > Regards > > Chris > PS I'm not on-line all the time, I pick up email every hour or two. > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail headers & filtering
Debbie Dyer wrote: >mailboxes too - next one who does I will ask them to check their dns as > Its a problem with the sender's domain, rather than the recipient. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail headers & filtering
Ok, thx Chris. I'll have to take that up with my providers. Maybe its the same problem for the others who've been contacting me re mails not arriving at their mailboxes too - next one who does I will ask them to check their dns as well. Debbie - Original Message - From: "Chris Hewitt" <[EMAIL PROTECTED]> To: "Debbie Dyer" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, September 30, 2002 6:52 PM Subject: Re: [PHP] Re: mail headers & filtering > Debbie Dyer wrote: > > >addresses and got it bounced back with the following:- > > > >X-AntiAbuse: This header was added to track abuse, please include it with > >any abuse report > >X-AntiAbuse: Primary Hostname - server.securesite7.com > >X-AntiAbuse: Original Domain - c-u-online.co.uk > >X-AntiAbuse: Originator/Caller UID/GID - [32116 32117] / [32116 32117] > >X-AntiAbuse: Sender Address Domain - server.securesite7.com > > > Debbie, > > It may be dns related. Its one of the things that an anti-abuse program > can easily check. Your c-u-online.co.uk translates to 64.46.107.4 so its > in forward dns OK. Doing the reverse lookup, there is no answer (hostname): > > [g0pae@server g0pae]$ dig -x 64.46.107.4 > ;; Got answer: > ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 30427 > ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 > > ;; QUESTION SECTION: > ;4.107.46.64.in-addr.arpa.INPTR > > ;; Query time: 3911 msec > ;; SERVER: 158.152.1.58#53(158.152.1.58) > ;; WHEN: Mon Sep 30 18:45:51 2002 > ;; MSG SIZE rcvd: 42 > > You should also have reverse dns set. I think this is probably your > whole problem, but if not its a lot of it. > > Regards > > Chris > > > > -- > 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] Re: mail headers & filtering
Debbie Dyer wrote: >addresses and got it bounced back with the following:- > >X-AntiAbuse: This header was added to track abuse, please include it with >any abuse report >X-AntiAbuse: Primary Hostname - server.securesite7.com >X-AntiAbuse: Original Domain - c-u-online.co.uk >X-AntiAbuse: Originator/Caller UID/GID - [32116 32117] / [32116 32117] >X-AntiAbuse: Sender Address Domain - server.securesite7.com > Debbie, It may be dns related. Its one of the things that an anti-abuse program can easily check. Your c-u-online.co.uk translates to 64.46.107.4 so its in forward dns OK. Doing the reverse lookup, there is no answer (hostname): [g0pae@server g0pae]$ dig -x 64.46.107.4 ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 30427 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;4.107.46.64.in-addr.arpa.INPTR ;; Query time: 3911 msec ;; SERVER: 158.152.1.58#53(158.152.1.58) ;; WHEN: Mon Sep 30 18:45:51 2002 ;; MSG SIZE rcvd: 42 You should also have reverse dns set. I think this is probably your whole problem, but if not its a lot of it. Regards Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail headers & filtering
Hi Henry "I think that we just have to accept that emails can no longer be relied upon." <- yes I know we all want to stop spam but when you rely on email to automate signups, speak to customers etc..it's a Good luck finding your javascript encoder Debbie - Original Message - From: "Henry" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, September 30, 2002 5:29 PM Subject: [PHP] Re: mail headers & filtering > Hi Debbie et.al. > > I think that we just have to accept that emails can no longer be relied > upon. > > How about somebody making a javascript email encoder so that if you use a > javascript enabled mail client it will get decoded only once it arrives with > the recipient. With a link for those people without javascript enabled email > clients to view the message remotely on a > decode server if they wish. > > Henry Grech-Cini > > PS. If anybody does do this please let me know > > > "Debbie Dyer" <[EMAIL PROTECTED]> wrote in message > 020f01c26895$619cd880$8c093c3e@homepc">news:020f01c26895$619cd880$8c093c3e@homepc... > I sent this mail earlier:- > > "More and more emails seem to be getting blocked by mail filtering systems > looking for spam (but trashing legitimate mail at the same time). Does > anyone have any tips for ensuring mails get through these systems (with > regard to headers) or do we just have to accept now that email can no longer > be relied upon as a means of communication?" > > I don't know if it arrived or if there were any replies due to my own > provider blocking my mails - I know they are doing it because I tested it > myself and because I have just subscribed to this list under another email > address - this other email ad is receiving the php list mails the other is > not. > > Time to change ISP but anyway, if this mail was received and there were any > replies, I'd be grateful if someone could forward them to me. > > Thanks > Debbie > > > > > -- > 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] Re: Mail problem with more than 1k users
on 24/09/02 2:12 PM, Peter J. Schoenster ([EMAIL PROTECTED]) wrote: > Eeks. I hate that. I hate email that does not indicate it knows who > I am. Why is sending one email to one user so bad? I can't think of a > reason that would trump the personalization that I like so much. But > I'm all ears. I hate it too, but the complications of personalised email really do outweigh the benefits, unless you're prepared for: a) long development time b) constantly hitting the "ceiling" of your code/server limits and having to re-evaluate the code ("it worked for 1000, but now i have 3000", etc) c) placing HUGE burdens on the server Bulk mail in a personalised manner should be done with dedicated software and a dedicated server... I think it's a little wishful to place such burdens on a WEB server... especially one which is a shared server. Even if the code does work, the sysadmin should shut it down to prevent the massive performance hit you cause. If you've got your own server(s), that's a different story... but then I'd be using ezmlm or something like that. Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mail problem with more than 1k users
> On 09/23/2002 08:08 PM, Research And Development wrote: > > 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? I guess you are putting 500 emails in the Bcc field. I guess. I like to personalize outgoing mail. I has a script sending *lots* of email and I didn't think it through. My cohort had to clean up after me and he said that he just changed a parameter to sendmail to queue the mail, I *think* ... I haven't sent a lot of mail since then but I'll look at how I was using sendmail. On 24 Sep 2002 at 0:41, Manuel Lemos wrote: > I am not sure what you mean by 500 emails per header. > > Anyway, if you are personalizing messages, ie send a message per user, > avoid that at all costs and if possible send a single message to all > users. Eeks. I hate that. I hate email that does not indicate it knows who I am. Why is sending one email to one user so bad? I can't think of a reason that would trump the personalization that I like so much. But I'm all ears. Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Mail problem
In article <002101c25029$2ca0c490$[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > I have this set on both boxes. Here are the settings - > > local box (which does send mail)isp box (does not send > mail) > sendmail_from me@@localhost.com 'no value' > sendmail_path /usr/sbin/sendmail -t -i/usr/sbin/sendmail -t -i > SMTP localhost localhost > > > > > > > > I actually had to set the SMTP setting to localhost on our > > solaris boxes to > > get this to work. I discovered this because we have a few > > older machines > > without php.ini files altogether, and the default is to have > > this set (the > > older machines worked). > > You may wish to test the value tht mail() returns - if it returns true then the mail has been successfully handed off to the MTA and beyond the scope of PHP; in this case you then need to look at your system mail logs to see if there is something useful there. It may also be that the mail is successfully sent, but bounces for whatever reason; a check of the relevant mailboxes (postmaster, admin etc) may turn up more info. -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mail problem
Hello, On 08/30/2002 07:15 AM, Mark Colvin wrote: > I have some more information that may be relevant to my problem. I compared > the phpinfo() from both servers and there is a difference. The sendmail_from > variable in the php.ini on my server is set to [EMAIL PROTECTED] The same > variable on my isp's ini file is set to 'no value'. Would this stop my > emails from being sent and if so can I change this value from within my > script or would it have to be directly amended in the php.ini file? Maybe. You may have to define that variable in the ISP but that may not be your only problem. -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mail problem
Hello, On 08/30/2002 05:26 AM, Mark Colvin wrote: > My development platform is linux 7.2 and php4.0.6. The production server is > also linux (I think 7.2) but the php version 4.1.1. If it is not sending a message, maybe the mail() function is not enabled because configure could not find sendmail program in the path. In that case you will need to recompile PHP with sendmail in the path of the user that runs configure. -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mail()....
Brian, Please be aware that many email clients will NOT read HTML. The human readers are then presented with raw HTML and get very <...?...> upset about it! (that's why list postings are not supposed to be in HTML/rich text format) Regards, =dn > It's a text-based newsletter... > > I have a solution i think... so it'll look the same... just need to verify > that it *should* be the same... > > inserting the contents in html, but within a ? > > 2'nd, using the following headers, sends it as an attachment it seems... > > $headers = "MIME-Version: 1.0\r\n"; > $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; > > TIA.. > > "Brian McGarvie" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Is there a way to set the font on a plaintext email? > > > > > > > > -- > 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] Re: Mail problem
I have this set on both boxes. Here are the settings - local box (which does send mail)isp box (does not send mail) sendmail_from me@@localhost.com 'no value' sendmail_path /usr/sbin/sendmail -t -i/usr/sbin/sendmail -t -i SMTPlocalhost localhost > > > I actually had to set the SMTP setting to localhost on our > solaris boxes to > get this to work. I discovered this because we have a few > older machines > without php.ini files altogether, and the default is to have > this set (the > older machines worked). > 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] Re: Mail problem
Erwin, sendmail on my local server does indeed reside in /usr/lib/sendmail although phpinfo shows sendmail_path = /usr/sbin/sendmail -t -i it still sends the mail? Why is this the case and would you suggest anything to enable me to get my mail working with my isp. I do not have direct access to php.ini with my isp. Mark > -Original Message- > From: Erwin [mailto:[EMAIL PROTECTED]] > Sent: 30 August 2002 14:27 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Re: Mail problem > > > > Am I correct in > > assuming that the SMTP and sendmail_from variables are only relevant > > for webservers on windows hosts and all I need to be concerned with > > is sendmail_path? > > Yes, that is correct. Did you check for existence of > /usr/sbin/sendmail? > Sendmail often resides in /usr/lib/sendmail, so you could > check that. Try > file_exists, or open a pipe with popen. > > Grtz Erwin > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php 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] Re: Mail problem
I actually had to set the SMTP setting to localhost on our solaris boxes to get this to work. I discovered this because we have a few older machines without php.ini files altogether, and the default is to have this set (the older machines worked). Thanks Mark Bond -Original Message- From: Mark Colvin [mailto:[EMAIL PROTECTED]] Sent: 30 August 2002 13:40 To: 'Erwin' Cc: Php (E-mail) Subject: RE: [PHP] Re: Mail problem Still not resolved. I checked my local php.ini and the sendmail_path variable is commented out. If I do a phpinfo() on the same server, sendmail_path has a value of /usr/sbin/sendmail -t -i ? I don't know where it pick up this value from but I can send emails from this server. The production server that is situated with my isp also has the sendmail_path set to /usr/sbin/sendmail -t -i but this won't send emails. Both web servers are on linux 7.2 boxes. Am I correct in assuming that the SMTP and sendmail_from variables are only relevant for webservers on windows hosts and all I need to be concerned with is sendmail_path? I have searched various places for an answer as to why I can't mail from my production server without much success. 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mail problem
> Am I correct in > assuming that the SMTP and sendmail_from variables are only relevant > for webservers on windows hosts and all I need to be concerned with > is sendmail_path? Yes, that is correct. Did you check for existence of /usr/sbin/sendmail? Sendmail often resides in /usr/lib/sendmail, so you could check that. Try file_exists, or open a pipe with popen. Grtz Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Mail problem
Still not resolved. I checked my local php.ini and the sendmail_path variable is commented out. If I do a phpinfo() on the same server, sendmail_path has a value of /usr/sbin/sendmail -t -i ? I don't know where it pick up this value from but I can send emails from this server. The production server that is situated with my isp also has the sendmail_path set to /usr/sbin/sendmail -t -i but this won't send emails. Both web servers are on linux 7.2 boxes. Am I correct in assuming that the SMTP and sendmail_from variables are only relevant for webservers on windows hosts and all I need to be concerned with is sendmail_path? I have searched various places for an answer as to why I can't mail from my production server without much success. 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] Re: Mail problem
>> The sendmail_from variable in the php.ini on my server is set to >> [EMAIL PROTECTED] The same variable on my isp's ini file is set to >> 'no value'. Would this stop my emails from being sent and if so can >> I change this value from within my script or would it have to be >> directly amended in the php.ini file? I don't think this would stop emails from being sent. There are two ways to change the From header: - Use the function ini_set("sendmail_from", "" ); - Use "From: " as the fourth argument to your mail call Grtz Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Mail problem
I have some more information that may be relevant to my problem. I compared the phpinfo() from both servers and there is a difference. The sendmail_from variable in the php.ini on my server is set to [EMAIL PROTECTED] The same variable on my isp's ini file is set to 'no value'. Would this stop my emails from being sent and if so can I change this value from within my script or would it have to be directly amended in the php.ini file? 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] Re: Mail()....
If you need plaintext newsletter, you can not use HTML at all, even pretending that it is a plain-text. It will be screwed badly on the plaintext-only e-mail clients anyway. Stas - Original Message - From: "Brian McGarvie" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 30, 2002 10:27 AM Subject: [PHP] Re: Mail() > It's a text-based newsletter... > > I have a solution i think... so it'll look the same... just need to verify > that it *should* be the same... > > inserting the contents in html, but within a ? > > 2'nd, using the following headers, sends it as an attachment it seems... > > $headers = "MIME-Version: 1.0\r\n"; > $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; > > TIA.. > > "Brian McGarvie" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Is there a way to set the font on a plaintext email? > > > > > > > > -- > 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] Re: Mail problem
Manuel, My development platform is linux 7.2 and php4.0.6. The production server is also linux (I think 7.2) but the php version 4.1.1. On your second point, do you mean I should say something like this - header("Location: http://ccmltdcouk.site.securepod.com/test.php";) This is our temporary domain name. I hope this helps. > The mail function mail fail for many reasons but you are not checking > its return value. Possibly it is just PHP configuration issue on your > server. Which platform do you use? > > Another point is that the Location: header is meant to be > interpreted by > the user browser, not your server. So, it should include the > real server > domain because localhost for each user is their own machine, not your > server. > > > -- > > Regards, > Manuel Lemos > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php 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