Jump to content

linux1880

Members
  • Posts

    136
  • Joined

  • Last visited

Posts posted by linux1880

  1. If insert the above php mail block code on the original page which has got other variables and forms that mail thing work but when i create another page sendmail.php of this mail and insert the code

    <?php
    $to = "memem@gmail.com";
    $subject = "This is a email feedback from me";
    $body = $row['noteforstudents'];
    $headers = "From: ashfh@djd.co.uk\r\n" .
        "X-Mailer: xxxx LONDON";
    if (mail($to, $subject, $body, $headers)) {
      echo("<p>Message sent!</p>");
    } else {
      echo("<p>Message delivery failed...</p>");
    }
    ?>  

     

    I get empty message .

     

    It would be no problem if the mail wouldn't go everytimes I refresh the page while placing the code on the same page so i did put the button referencing

     

    <form method="post" action="sendmail.php">
      <div align="center">
        <input type="submit" value="send this email"/>
      </div>
    </form>

     

    so that if i press the button mail would go to student,

     

    no luck  :-[

     

  2. Thank you sir,

     

    $body = $row['noteforstudents'];

     

    This code did work on the same page as there are other codings and the mail goes everytime the page refresh.

     

    But when i move this page to another php page like something.php it doesn;t pull the data from the database, any help would be greatful

     

    <?php
    $to = "memem@gmail.com";
    $subject = "This is a email feedback from me";
    $body = $row['noteforstudents'];
    $headers = "From: ashfh@djd.co.uk\r\n" .
        "X-Mailer: xxxx LONDON";
    if (mail($to, $subject, $body, $headers)) {
      echo("<p>Message sent!</p>");
    } else {
      echo("<p>Message delivery failed...</p>");
    }
    ?>  

     

     

  3. I did try

     

    <?php
    $to = "webmaster@placett.co.uk";
    $subject = "You have received feedback from LONDON";
    $body = $row['noteforstudents'];		
    $headers = "From: an@angliancollege.co.uk\r\n" .
        "X-Mailer:LONDON";
    if (mail($to, $subject, $body, $headers)) {
      echo("<p>Message sent!</p>");
    } else {
      echo("<p>Message delivery failed...</p>");
    }
    ?>

     

    There is nothing on the message body, how ever, when i just type plain text like "hellow how are you". It goes,

     

    dunno what's happening :(

  4. ?php

    $to = "me@headache.com";

    $subject = "hi how are you";

    $body = "helllo hello this is test.. this is test ........";

    $headers = "From: mail@mail.co.uk\r\n" .

        "X-Mailer: xxxx LONDON";

    if (mail($to, $subject, $body, $headers)) {

      echo("<p>Message sent!</p>");

    } else {

      echo("<p>Message delivery failed...</p>");

    }

    ?>

    Hello friends,

     

    I want to send this email to different users.

     

    I already have variables like

     

    emails: <?=$row['email_add'] ?>

    body: <?=$row['noteforstudents'] ?>

     

    I just want different person to receive email according to the details above. Do I need to set up session or require_once for this ?

     

    I don't know how to setup pls help

    Thanks Edit/Delete Message

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.