SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Member
    Join Date
    Oct 2004
    Location
    Mexico City
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    weird errors using mail()

    I got these erros messages while using mail() in a servers client:

    Code:
    Warning: Mail delivery program returned with exit code: 17152 in /usr/local/etc/httpd/vhosts/www.aaterracota.com.mx/htdocs/spanish/contacto_form.php on line 41
    
    Warning: Mail delivery program returned: Inappropriate ioctl for device in /usr/local/etc/httpd/vhosts/www.aaterracota.com.mx/htdocs/spanish/contacto_form.php on line 41
    The mail is sent but at the top of the page these errors are echoed.

    Anyone???

    Chepe

  2. #2
    Woof! Woof! elel1138's Avatar
    Join Date
    Apr 2004
    Location
    Warsaw, Poland
    Posts
    202
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm, I never actually succeeded in sending a mail using mail() function . I use PEAR:Mail instead... Easier and machine independent.
    Leszek Leszczyński
    www.hazelsoft.com
    --- Real programmers don't document. If it was hard to write,
    it should be hard to understand. ---

  3. #3
    SitePoint Wizard mark_W's Avatar
    Join Date
    Mar 2004
    Location
    West Midlands, United Kingdom
    Posts
    2,631
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Chepe
    I got these erros messages while using mail() in a servers client:

    Code:
    Warning: Mail delivery program returned with exit code: 17152 in /usr/local/etc/httpd/vhosts/www.aaterracota.com.mx/htdocs/spanish/contacto_form.php on line 41
     
     Warning: Mail delivery program returned: Inappropriate ioctl for device in /usr/local/etc/httpd/vhosts/www.aaterracota.com.mx/htdocs/spanish/contacto_form.php on line 41
    The mail is sent but at the top of the page these errors are echoed.

    Anyone???

    Chepe
    I saw your post and did a bit of research on this, Came up with other people experiencing the problem but no one ever posted a solution!

    Tricky one!

  4. #4
    SitePoint Member
    Join Date
    Oct 2004
    Location
    Mexico City
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well.... I will give a try to PEAR:mail but... what is PEAR:mail....???? I am somehow new to this.

    Chepe

  5. #5
    SitePoint Wizard mark_W's Avatar
    Join Date
    Mar 2004
    Location
    West Midlands, United Kingdom
    Posts
    2,631
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this link mate

    http://pear.php.net/

  6. #6
    SitePoint Member
    Join Date
    Oct 2004
    Location
    Mexico City
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks mark... downloaded but it seems the server is a windows server and it has not the PEAR include path in its php.ini.

    So PEAR is a collection of PHP classes, great! but not for this client. I will look for ... maybe a JavaScript.

    Thank you!

  7. #7
    Woof! Woof! elel1138's Avatar
    Join Date
    Apr 2004
    Location
    Warsaw, Poland
    Posts
    202
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Chepe
    Thanks mark... downloaded but it seems the server is a windows server and it has not the PEAR include path in its php.ini.
    Not a problem, dump all the files (Mail.php and some more) into the site directory and you're done.
    Leszek Leszczyński
    www.hazelsoft.com
    --- Real programmers don't document. If it was hard to write,
    it should be hard to understand. ---

  8. #8
    SitePoint Member
    Join Date
    Oct 2004
    Location
    Mexico City
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Got it...

    Installed PEAR::Mail and I got the same error, so... my error???

    I had this code:

    Code:
    mail("some@some.com","somthing here","some message","From: someone@somedomain.com.mx", "robot@somedomain.com.mx");
    So after some tests:

    Code:
    $headers .= "To: AATerracota <someone@somedomain.com.mx>\r\n"; 
    $headers .= "From: ".$subname." <".$subemail.">\r\n"; 
    mail("some@some.com","somthing here","some message", $headers);
    The funny thing is that I have the fist code working on several domains without any problem.

    Thanks for all of your help.

    Chepe

  9. #9
    Woof! Woof! elel1138's Avatar
    Join Date
    Apr 2004
    Location
    Warsaw, Poland
    Posts
    202
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, it is not enough to just install PEAR::Mail and use the same code as before . You have to actually use the Mail class; look at the documentation for more info.
    Leszek Leszczyński
    www.hazelsoft.com
    --- Real programmers don't document. If it was hard to write,
    it should be hard to understand. ---

  10. #10
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PEAR::Mail uses mail() internally so this won't solve the problem.

    Tell your server's admin she must check php installation, especially user name/rights.
    If you are the admin... hmm... google "sendmail exit code 67" or something like this.


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
  •