Jump to content

if i want to use apache insted of smtp


jeppers

Recommended Posts

can you help the problem is that i want to have a moc up of an email system.

 

using apache. but the only way i knw how to do it is by smtp can you have a look at the code and tell me hoe to correct it please thanks.

<?php include('title.inc.php');  ?>
<?php include('corefuncs.php');  
if (function_exists('nukemagicquotes')) {
nukemagicquotes();
}
// process the email 
if (array_key_exists('send', $_POST)) {
$to = 'paul@paul.com';
$subject = 'questions about karisma';

//process the $_post variables 
$name = $_post['name'];
$email = $_post['email'];
$comments = $_post['comments'];

// build the message
$message = "Name: $name";
$message .= "Email: $email";
$message .= "Comments: $comments";

// limit length to 70 caraters
$message = wordwrap($message, 70);

//send it
$send_contact = mail($to, $subject, $message);
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Japan Journey<?php if (isset($title)) {echo "&#8212;{$title}";} ?></title>
<link href="journey.css" rel="stylesheet" type="text/css" media="screen" />
</head>

<body>
<div id="header">
    <h1>Japan Journey </h1>
</div>
<div id="wrapper">
    <?php include('menu.inc.php'); ?>
    <div id="maincontent">
        <h1>Contact us  </h1>
	<?php 
	if ($_post && !$mailsent) {
	?>
		<p class="warning">Sorry, there was a problem sending your message please try later </p>
		<?php
		}
		elseif ($_post && $mailsent) {
		?>
			<p><strong>Yourmessage has been sent. Thank You</strong></p>
			<?php } ?>

        <p>Please fill in the contact infomation and ask any questing regarding karisma photography.</p>
        <form id="feedback" method="post" action="">
            <p>
                <label for="name">Name:</label>
                <input name="name" id="name" type="text" class="formbox" />
            </p>
            <p>
                <label for="email">Email:</label>
                <input name="email" id="email" type="text" class="formbox" />
            </p>
            <p>
                <label for="comments">Comments:</label>
                <textarea name="comments" id="comments" cols="60" rows="8"></textarea>
            </p>
            <p>
                <input name="send" id="send" type="submit" value="Send message" />
            </p>
        </form>

</div>
    
</div>
</body>
</html>

 

what ever help you can give will be most enjoyed

Link to comment
Share on other sites

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.