jeppers Posted April 26, 2007 Share Posted April 26, 2007 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 "—{$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 Quote Link to comment https://forums.phpfreaks.com/topic/48785-if-i-want-to-use-apache-insted-of-smtp/ Share on other sites More sharing options...
jeppers Posted April 26, 2007 Author Share Posted April 26, 2007 mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\test\contact.php on line 25 this is the message i get Quote Link to comment https://forums.phpfreaks.com/topic/48785-if-i-want-to-use-apache-insted-of-smtp/#findComment-239082 Share on other sites More sharing options...
jeppers Posted April 26, 2007 Author Share Posted April 26, 2007 please i need some kinda hope this is too much i have neen banging me head for a long time any hints Quote Link to comment https://forums.phpfreaks.com/topic/48785-if-i-want-to-use-apache-insted-of-smtp/#findComment-239089 Share on other sites More sharing options...
ToonMariner Posted April 26, 2007 Share Posted April 26, 2007 have you set the SMTP setting in your php.ini? make sure it is set to your service providers smtp server Quote Link to comment https://forums.phpfreaks.com/topic/48785-if-i-want-to-use-apache-insted-of-smtp/#findComment-239097 Share on other sites More sharing options...
jeppers Posted April 26, 2007 Author Share Posted April 26, 2007 i have no sevic provider and i am not using mysql for this email system. i just need help recoding because i am a beginner Quote Link to comment https://forums.phpfreaks.com/topic/48785-if-i-want-to-use-apache-insted-of-smtp/#findComment-239106 Share on other sites More sharing options...
taith Posted April 26, 2007 Share Posted April 26, 2007 apache itself is a web server... not an smtp server... it would only send emails through your ISP... you want your php.ini settings to match those from your ISP... Quote Link to comment https://forums.phpfreaks.com/topic/48785-if-i-want-to-use-apache-insted-of-smtp/#findComment-239114 Share on other sites More sharing options...
jeppers Posted April 26, 2007 Author Share Posted April 26, 2007 do you know how to dso that i have knowledge of php.ini Quote Link to comment https://forums.phpfreaks.com/topic/48785-if-i-want-to-use-apache-insted-of-smtp/#findComment-239116 Share on other sites More sharing options...
taith Posted April 26, 2007 Share Posted April 26, 2007 call your isp, get their smtp server information, then put those servers, into your php.ini... Quote Link to comment https://forums.phpfreaks.com/topic/48785-if-i-want-to-use-apache-insted-of-smtp/#findComment-239119 Share on other sites More sharing options...
jeppers Posted April 26, 2007 Author Share Posted April 26, 2007 i am only using this on my local machine. dose that matter not for the web yet just a mock up Quote Link to comment https://forums.phpfreaks.com/topic/48785-if-i-want-to-use-apache-insted-of-smtp/#findComment-239121 Share on other sites More sharing options...
taith Posted April 26, 2007 Share Posted April 26, 2007 yes... it still matters... Quote Link to comment https://forums.phpfreaks.com/topic/48785-if-i-want-to-use-apache-insted-of-smtp/#findComment-239122 Share on other sites More sharing options...
jeppers Posted April 26, 2007 Author Share Posted April 26, 2007 i want to say that i have achived this challenge but now its not commimg up with the error but the confimation dose not appier Quote Link to comment https://forums.phpfreaks.com/topic/48785-if-i-want-to-use-apache-insted-of-smtp/#findComment-239132 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.