subhra4484
New Member
- Messages
- 2
- Reaction score
- 0
- Points
- 0
How can I use the smtp server as mail server in my website??
---------- Post added at 10:58 AM ---------- Previous post was at 10:42 AM ----------
I have form and I want to send the data directly to my email id... But it's not working...
http://reliconindia.x10.mx/mailform.php
Code for the file is here..
---------- Post added at 10:58 AM ---------- Previous post was at 10:42 AM ----------
I have form and I want to send the data directly to my email id... But it's not working...
http://reliconindia.x10.mx/mailform.php
Code for the file is here..
PHP:
<?php
if (isset($_REQUEST['email']))
//if "email" is filled out, send email
{
ini_set('SMTP', "mail.reliconindia.x10.mx");
ini_set('smtp_port', 5665);
ini_set('sendmail_from', "subhra44@reliconindia.x10.mx");
//send email
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
mail("subhra44@gmail.com", $subject, $message, "From:" . $email);
echo "Thank you for using our mail form";
}
else
//if "email" is not filled out, display the form
{
echo "<form method='post' action='mailform.php'>
Email: <input name='email' type='text' /><br />
Subject: <input name='subject' type='text' /><br />
Message:<br />
<textarea name='message' rows='15' cols='40'>
</textarea><br />
<input type='submit' />
</form>";
}
?>