Jump to content

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
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.