Got almost everything to work. Thank you all for your input. Code as
<?include ("../"); ?>


// setup SQL statement to retrieve link

$SQL = " SELECT * FROM $tablename1 ";
$SQL = $SQL . " WHERE id = $id ";

// execute SQL statement
$ret = mysql_db_query($dbname,$SQL,$link);

if (!$ret) { echo("ERROR: " . mysql_error() . "\n$SQL\n"); }

echo ("<P><B> Email Sent</B></P>\n");

// retrieve values
$row = mysql_fetch_array($ret);
$email = $row["email"];
$title = $row["title"];
$comments = $row["comments"];
$title = $row["title"];

mail($email, $title, $comments, $emailaddress);



$emailaddress is set in the file and comes in alright as a
header in the note.

However, the mail is sent from the following:

Is there a way to tell the PHP Server where the mail is coming from.
Alex Francis
Cameron Design
35, Drumillan Hill
Greenock PA16 0XD

Tel 01475 798106

This message is sent in confidence for the addressee only. It may contain
legally privileged information.
Unauthorised recipients are requested to preserve this confidentiality and
to advise the sender
immediately of any error in transmission.

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to