On 14 May 2001 16:59:48 -0700, Christian Dechery <[EMAIL PROTECTED]> 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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]