Re: need some ideas here...

From: Date: Tue, 15 May 2001 00:57:01 +0000
Subject: Re: need some ideas here...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-52778@lists.php.net to get a copy of this message
On 14 May 2001 16:59:48 -0700, Christian Dechery <lemming@vento.com.br> wrote: > My free-web-hosting (www.f2s.com) does not allow PHP to send emails... I've > tried everything... the mail() function, my alternate function which calls > popen("/usr/lib/sendmail -t") and even a script.cgi with '#!/usr/bin/php' > and all that stuff... Did you try a popen with something /usr/bin/mail? (I assume you've checked the file paths to make sure they're correct) > the mail simply won't go an mail() always returns false... > I'm guessing there's no mail sending in this server... > > so what do I do? > > is it possible for me to call a script on another host from with a script > and return something to it? PHP does allow arbitrary URLs to be loaded, so you could setup a script and simply do something like this: $email_script = fopen("http://someotherhost/mail/script.php?To=blah...", "r"); $Status = fgetss($email_script); If you need to send large emails, you'll need to fake a POST request. I've had to do this the hard way in the past but I think there are a couple PHP classes floating around now which will let you do it. (And, of course, you could use CURL) Alternately, if you have a friendly mail server available, you could simply use one of the SMTP scripts available to send directly to the mail server. Check out phpclasses.upperdesign.com for a couple scripts.

« previous php.general (#52778) next »