Results 1 to 2 of 2

Thread: i have a doubt on mail functions please help me

  1. #1
    Join Date
    Nov 2012

    i have a doubt on mail functions please help me

    hi friends

    i am working with mail functions my code is working on my local host but not in server please let me why taht is not working in server....

    Here is my code:
    $link = mysql_connect('localhost', 'root', '');
    $sql="SELECT password FROM registration WHERE emailid='$eid'";
    $message="your password is".$r[0];
    if(mail($to,$subject,$message,$header ))
    echo("<b style='font-family:Verdana, Arial, Helvetica, sans-serif; color:#0099ff'>Your password has been mailed to your email address:<b><br><center>".$eid."</center>");
    echo("<p>Message delivery failed...</p>");

  2. #2
    Join Date
    Oct 2012
    a) is there a MySQL database on the server?
    b) is the mysql extension enabled in php.ini / compiled into the apache php module?
    c) do you have the right database connection details - hint: live database servers where the 'root' account doesn't have a password are not a good idea.
    d) does the database 'ramya' exist on the database server?
    e) does the 'registration' table exist in the database 'ramya'?
    f) are there any records in the registration table?
    g) is email id a numeric or string field - the query assumes the emailid field is a string
    h) is there a SMTP mail server installed and running on your webserver?
    i) is the SMTP server configured to allow the php mail() function to run properly - mail() won't error even if the SMTP server can't send emails.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center