Jump to content

Send Mail Problem

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1
cakka

cakka

    Programmer

  • Members
  • PipPipPipPip
  • 192 posts
Hi , i am creating a sendmail code php and getting error message :
Warning: mail() expects at least 3 parameters, 1 given in /home/siteroot/public_html/sendmail.php on line 57

This is the php code that i created :
<?php
    $subject = "Contact";
    $name    = $_POST['name'];
    $phone   = $_POST['phone'];
    $email   = $_POST['email'];
    $txtmsg  = $_POST['txtmsg'];
    $to      = "xxxxx@mail.com";
    $headers = "From: $email\r\nReply-to: $email\r\n";
    
    $message = "<p>Name     : $name<br /><br />Phone Number     : $phone<br /><br />Message    : $txtmsg</p>";
        
    if (mail("$to,$subject,$message,$headers")){
      print "Thanks for contact, i will response your message.";
    }else {
      print "Your email is not send.";
    }

  ?>


#2
cakka

cakka

    Programmer

  • Members
  • PipPipPipPip
  • 192 posts
Hahaha...... i am false , just on the " .... "
It was cleared :D
Thanks all

#3
Brandon W

Brandon W

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,828 posts
LOL. Keep reading over your code multiple times and see if you can spot it first then post :)
jQuery Selectors Tutorial - jQuery Striped Table tutorial - jQuery Events - jQuery Validation

Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!


#4
cakka

cakka

    Programmer

  • Members
  • PipPipPipPip
  • 192 posts
Thanks Brandon and sorry for my disfunctional post :)

#5
Brandon W

Brandon W

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,828 posts
It's all good mate. Everyone makes mistakes at least once in their life :D
jQuery Selectors Tutorial - jQuery Striped Table tutorial - jQuery Events - jQuery Validation

Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!


#6
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Once in their life? I know this guy who makes mistakes all the time... he's called Xav.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#7
Brandon W

Brandon W

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,828 posts
Yer at least once. But I think people would make at least one a day.
jQuery Selectors Tutorial - jQuery Striped Table tutorial - jQuery Events - jQuery Validation

Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!


#8
cakka

cakka

    Programmer

  • Members
  • PipPipPipPip
  • 192 posts
Hi, all nice to meet you :D
I think this thread will be usefull for know each other :D