about smtp connection

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..

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>";
  }
?>
 

Anna

I am just me
Staff member
Messages
11,758
Reaction score
586
Points
113
smtp port would be 25 in our setup. The from email must be a valid email listed under your cPanel account (click email accounts and create it if it does not already exist).
 

subhra4484

New Member
Messages
2
Reaction score
0
Points
0
smtp port would be 25 in our setup. The from email must be a valid email listed under your cPanel account (click email accounts and create it if it does not already exist).

Thank you for the reply...
But it's working now..I have not changed anything..I don't know how...
Also I got the setup config from the site itself..
There the outgoing smtp port was 5665...
 
Last edited:
Top