Page 1 of 1

How do I specify which smtp server to use for this script?

Posted: Tue May 23, 2006 9:30 am
by Subyne Simean
The server I'm trying to host this script on doesn't support smtp emails, therefore this script will simply take you to a thank you page without actually sending the email to the specified email address.

Can this be resolved by specifying which smtp server the script uses and if so, how do I do it?

Code: Select all

<?
  $email = $_REQUEST['email'] ;
  $message = $_REQUEST['message'] ;

  mail( "myemailaddy@isp.com", "New Message!",
    $message, "From: $email" );
  header( "Location: thankyou.html" );
?>
hope you can help, thanks :)

Posted: Tue May 23, 2006 9:31 am
by Subyne Simean
I should mention that I don't have access to a php.ini file on the server in question... so I guess I would have to make the change inside the above script....?