PHP E-mail codeing is not working in live. Please Help me

Discussion in 'PHP' started by SEO_BOSS, Dec 8, 2011.

  1. #1
    Hi Friends

    I am created php email code. But is not working live.Please give me sample code in php
     
    SEO_BOSS, Dec 8, 2011 IP
  2. kasun0777

    kasun0777 Well-Known Member

    Messages:
    355
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    138
    #2
    Simple Email Function
    <?php
    // The message
    $message = "This is Sample Message";
    
    // Email Send
    mail('youremail@example.com', 'My Subject', $message);
    ?>
    
    Code (markup):
    Included Custom Headers
    <?php
    $to      = 'nobody@example.com';
    $subject = 'the subject';
    $message = 'hello';
    $headers = 'From: webmaster@example.com' . "\r\n" .
        'Reply-To: webmaster@example.com' . "\r\n" ;
    
    mail($to, $subject, $message, $headers);
    ?>
    
    Code (markup):
    More Details >> http://php.net/manual/en/function.mail.php

    Or if u need to send secure bulk emails, you can use phpmailer function.
    http://sourceforge.net/projects/phpmailer/

    Tutorials >> http://www.web-development-blog.com/archives/send-e-mail-messages-via-smtp-with-phpmailer-and-gmail/
     
    kasun0777, Dec 8, 2011 IP
  3. SEO_BOSS

    SEO_BOSS Greenhorn

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #3
    HI kasun

    Thanks
     
    SEO_BOSS, Dec 8, 2011 IP