0810
09-15-2002, 10:09 PM
SMTP set up problem
hi how are you doing? I try to set up SMTP but I don't know how to set it up.
SMTP=(here) I don't know what I put in the ()
I know sendmail_from=itohideo@hotmail.com
I did mail code but I don't know hot to use SMTP with my script. Should I SMTP in my script or outside????? Could you tell me how to set it up.
Thanks you very much
My php is 4.22
Here is my code
<?
if(!isset($_POST[submit])){
?>
<form action="<?=$_SERVER["PHP_SELF"];?>" method="post">
<input type="text" name="name">
<input type="text" name="phone">
<input type="text" name="email">
<textarea rows="20" cols="20" name="bodytext"></textarea>
<input type="submit" value="Submit" name="submit">
</form>
<?
}else{
$myemail = "itohideo@hotmail.com";
$subject = "You have a message from $name";
$body = "$_POST[name] has sent you the following information.
His/her phone number is: $phone
His/her email is: $email
He/she has to say:
$_POST[bodytext]";
mail($myemail,$subject,$body,"From: $email");
}
?>
hi how are you doing? I try to set up SMTP but I don't know how to set it up.
SMTP=(here) I don't know what I put in the ()
I know sendmail_from=itohideo@hotmail.com
I did mail code but I don't know hot to use SMTP with my script. Should I SMTP in my script or outside????? Could you tell me how to set it up.
Thanks you very much
My php is 4.22
Here is my code
<?
if(!isset($_POST[submit])){
?>
<form action="<?=$_SERVER["PHP_SELF"];?>" method="post">
<input type="text" name="name">
<input type="text" name="phone">
<input type="text" name="email">
<textarea rows="20" cols="20" name="bodytext"></textarea>
<input type="submit" value="Submit" name="submit">
</form>
<?
}else{
$myemail = "itohideo@hotmail.com";
$subject = "You have a message from $name";
$body = "$_POST[name] has sent you the following information.
His/her phone number is: $phone
His/her email is: $email
He/she has to say:
$_POST[bodytext]";
mail($myemail,$subject,$body,"From: $email");
}
?>