Thread: Mail

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Location
    Kiev, Ukrain
    Posts
    88
    Rep Power
    2

    Question Mail


    i'm writing the "feedback" part for my site now. and i have a little problem with sending of mail.
    here is the code:
    PHP Code:
    <?php
    $name
    =$_POST['Name'];
    $mail=$_POST['Mail'];
    $subject=$_POST['Subject'];
    $content=$_POST['Content'];

    $admMail='admMail@gmail.com';
    $sentcontent='U. Name:'.$name."\n"
                
    .'U. Mail:'.$mail."\n"
                
    .'Mail'.$content."\n";
    $fromaddress='From: Helen.com';

    mail($admMail,$subject,$sentcontent,$fromaddress);
    ?>
    <html>
    <head>
    <title>Feedback</title>
    </head>

    <body>
        <H1> Your Feedback was successfully sent </H1>
    </body>
    </html>
    But i think it's not about code .
    Are there some necessary issues that i need to know about sending e-mails ?
    Is it possible to send mail using only my pc,denwer and e-net ? (i think no because i need reserved mail address)
    Can i do that from hosting ? if i didn't selected the e-mail address and i didn't done anything about preparing MY e-mail address.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,332
    Rep Power
    594
    The mail function requires you have an MTA. On Linux that would be postfix/sendmail. What Mail Transfer Agent do you have installed?
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Location
    Kiev, Ukrain
    Posts
    88
    Rep Power
    2
    Thats the thing i'm trying to find ! i need this MTA . it's a new word for me.
    Can u give me some short info about it ? while i'm googling this .
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,332
    Rep Power
    594
    As I said you need postfix/sendmail for Linux. Since these terms are "new" to you I suggest you use PHPMailer.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Location
    Kiev, Ukrain
    Posts
    88
    Rep Power
    2
    Thanks . I wanted to instal Thunderbird. But ok , i'll try this .
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,332
    Rep Power
    594
    Thunderbird is a client mail reader and has nothing to do with sending mail via PHP on a server.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Location
    Kiev, Ukrain
    Posts
    88
    Rep Power
    2
    Thank you . I'll try to understand all this schema .
  14. #8
  15. Web Developer/Musician
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Nov 2004
    Location
    Tennessee Mountains
    Posts
    2,408
    Rep Power
    1031
    Please research "mail header injection" for your own sanity. This form could be used to send spam and your server would get blacklisted. It's not much different than SQL injection or other similar attacks. Don't use user input unfiltered.

IMN logo majestic logo threadwatch logo seochat tools logo