If you have an account on a remote host, you can always do something
like this:
<?php
include("http://www.remotehost.com/~myaccount/mailfunction.inc");
mymail($to, $mailbody);
?>
where mailfunction.inc has the mymail function defined to just take your
parameters and stuff them into the standard mail().
Of course include()ing from remote hosts can be disabled when compiling
PHP, and if your host is really evil, the will have disabled this too.
Your last resort is to create your own mail function by fsockopen()ing a
connection to port 25 of your SMTP server and sending raw SMTP commands.
This would require some reading of the relevant mail RFCs...but is
definitely feasible.
Ben Gollmer
On Monday, May 14, 2001, at 07:04 PM, Christian Dechery 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...
>
> 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?
>
> like
> <?php
> code ... code ... code...;
> code ... code ... code...;
>
> here I'd have some code to call a script in another host that can send
> mails, of course with the necessary parms...;
>
> code code code....;
> code code code....;
> ?>
> ____________________________
> . Christian Dechery (lemming)
> . http://www.tanamesa.com.br
> . Gaita-L Owner / Web Developer
>
>
> -- 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]
>
>
--
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]