Mailing results for file_get_contents

the mail() function

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Tue Mar 06, 2012 6:08 am

Mailing results for file_get_contents

Postby sageauk » Tue Mar 06, 2012 6:16 am

Hi, I want to email a web page by using the "file_get_contents" I am using the below code but ain't working.
If you also know another way to do it I would appreciate.
:? :help:

Code: Select all

$mo= file_get_contents('');
    //change this to your email.
    $to = "";
    $from = "";
    $subject = " HTML email";

    //begin of HTML message
    $message = <<<EOF

   //end of message
    $headers  = "From: $from\r\n";
    //$headers .= "Content-type: text/html\r\n";
   $headers .=   "Content-type: text/css\r\n";

    // now lets send the email.
    mail($to, $subject, $message, $headers);

    echo "sent";

Return to “PHP coding => Mail”

Who is online

Users browsing this forum: No registered users and 1 guest