SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: php mail code?

Hybrid View

  1. #1
    Non-Member
    Join Date
    Mar 2013
    Location
    Sydney
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php mail code?

    Hello friends,
    I have need php mail code for enquiry mail for my website, so please suggest me code for that.
    Thanks

  2. #2
    SitePoint Member
    Join Date
    Mar 2013
    Location
    Ahmedabad
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its very simple.

    Code:
    mail($to,$subject,$message,$headers)
    
    Header could be following.
    
    // Always set content-type when sending HTML email
    $headers = "MIME-Version: 1.0" . "\r\n";
    $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
    
    // More headers
    $headers .= 'From: <webmaster@example.com>' . "\r\n";
    $headers .= 'Cc: myboss@example.com' . "\r\n";

    Jinal
    <snip />
    Last edited by Force Flow; Mar 12, 2013 at 18:13. Reason: Please wait 90 days for a real signature

  3. #3
    SitePoint Enthusiast rajeev13's Avatar
    Join Date
    Nov 2012
    Location
    New Delhi,India
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by noahwilson View Post
    Hello friends,
    I have need php mail code for enquiry mail for my website, so please suggest me code for that.
    Thanks
    Here is the reference :-

    http://php.net/manual/en/function.mail.php


Tags for this Thread

Bookmarks

Posting Permissions

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