
September 5th, 2003, 05:43 AM
|
|
Registered User
|
|
Join Date: Aug 2003
Posts: 22
Time spent in forums: 14 m 25 sec
Reputation Power: 0
|
|
|
Send Mail issue
I am looking for an answer to what would seem a puzing problem for me. I am using PHP to send contact feedback emails form a site I am developeing. The code is right as I have already tested it on other sites. The problem I have on this oe is using the mail() function the emails aren't sending because this new website is hosted on a windows server and so there is no sendmail path specified in php info() for the site.
There is however an ip number for smtp. Is it possible for me to make the mail() function use smtp to send mail and if so how do I do it? For refernece here is the php code used to send the mail.
PHP Code:
<?php
$name = $HTTP_POST_VARS['name'];
$email = $HTTP_POST_VARS['email'];
$feedback = $HTTP_POST_VARS['feedback'];
$toaddress = $HTTP_POST_VARS['toaddress'];
$subject = 'Feedback from the V8 Website';
$mailcontent = 'Message from:'.$name."\n".'Email:'.$email."\n".'Subject:'.$subject."\n".'Message:'.$feedback."\n";
$fromaddress = 'From:' .$email.'';
mail($toaddress, $subject, $mailcontent, $fromaddress);
?>
|