Jump to content

about require function.


ted_chou12

Recommended Posts

what if i urgently need the mail php function but my host server does not support it? What i was trying to do previously was to get the current page to include the mail function on another host server that supports it. But now it doesnt seem to work so i want to find another way out
Thanks
Ted
Can't include it but if someone had a generic script out there you could call it with your data.


For example assume there is a script that sends email that sits on a different server.

http://something/[email protected]&[email protected]&subject=Something

You could could assign the varialbes and call the script assigning your own variables.

$from = "[email protected]";
$to = "[email protected]";
$subject = "testing123...";
header("location: http://something/send_email.php?from=$from&to=$to&subject=$subject");

Likewise, you could set your html form to post to that url....

Dunno that you'll find such a generous script out there though...
hey, thanks, but cant i make one by myself, like:
<?php
$headers = "MIME-Version: 1.0rn";
$headers .= "Content-type: text/html; charset=iso-8859-1rn";
$headers .= "From: myname<$from>rn";
$headers .= "Return-Path: <$return>";

if (mail($to, $subject, $body, $headers)) {
  echo("<p>Message successfully sent!</p>");
} else {
  echo("<p>Message delivery failed...</p>");
}
?>
I upload this to the server that works for mail script, and then assign the variables through either the url or session will do.
This is a great idea, thanks :D
Ted

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.