Results 1 to 4 of 4

Thread: [RESOLVED]php email

  1. #1

    Thread Starter
    Hyperactive Member samsyl's Avatar
    Join Date
    Jun 2001
    Location
    London
    Posts
    338

    [RESOLVED]php email

    i m trying to send a simple email from php. it says email sent but i m not receiving any email ..

    here is my full code

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>huntandblake.co.uk</title>
    <link rel="stylesheet" type="text/css" href="style.css" />
    </head>
    <body>
    
    <?php
    if(mail('[email protected]','hi','Shanti Nai'))
     {
     echo('Email sent ..');
     }
    else
     {
     echo('Error sending email ..');
     }
    ?>
    
    </BODY>
    </HTML>
    Last edited by samsyl; Jun 18th, 2009 at 04:06 AM.

  2. #2
    Frenzied Member
    Join Date
    Apr 2009
    Location
    CA, USA
    Posts
    1,516

    Re: php email

    Simplistic suggestions first: have you tried looking for the email in your Junk folder? Have you tried sending to a different email?

    One problem I've had with PHP mail() is that the SMTP server I was using required authentication, which is not inherently supported by mail(). So, I used the PHPMailer class to get it working. Don't know if that's your problem though - check with your host.

  3. #3
    Addicted Member
    Join Date
    Mar 2009
    Posts
    156

    Re: php email

    this edited code worked for me..?
    PHP Code:
    $to="[email protected]";
    $subject="";
    $message="hi";
    $headers="Shanti Nai";

    $sent mail($to$subject$message$headers) ;
    if(
    $sent)
    {print 
    "Sent successfully"; }
    else
    {print 
    "We encountered an error sending"; } 
    I found this site good...
    http://www.w3schools.com/PHP/func_mail_mail.asp
    It even gives you (limited) info on how to lay out you email /n

    If anyone knows how to do a 'send page to friend' script i could do with some help.
    I have a php generated page and I'm looking to email it to other people.

    thanks
    Last edited by LingoOutsider; Jun 17th, 2009 at 08:32 AM.

  4. #4

    Thread Starter
    Hyperactive Member samsyl's Avatar
    Join Date
    Jun 2001
    Location
    London
    Posts
    338

    Re: php email

    thanks all of u for reply. problem was HOTMAIL. i tried few of hotmail account but didnt work. but its working with my bt account. thanks

Posting Permissions

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



Click Here to Expand Forum to Full Width