mail() to yahoo failed
Results 1 to 15 of 15

Thread: mail() to yahoo failed

  1. #1
    Junior Member
    Join Date
    Sep 2002
    Posts
    7

    Unhappy mail() to yahoo failed

    Hi, I've a line looks like this:
    <?
    mail($email1,$subject,$message,$other);
    ?>

    It works for hotmail and other mail server but not working at all for yahoo mail. It returns error by my mailserver below:

    ----- The following addresses had permanent fatal errors -----
    danluk2000@yahoo.ca
    (reason: 501 Syntax error in parameters or arguments)

    ----- Transcript of session follows -----
    ... while talking to mx1.mail.yahoo.com.:
    >>> MAIL From:<apache@danluk> SIZE=84
    <<< 501 Syntax error in parameters or arguments
    501 5.6.0 Data format error

    I did some search but still cannot figure out the solution. Please help. Thanks.

  2. #2
    Expert at something . . .
    Join Date
    Aug 2002
    Posts
    287
    PHP Code:
    <?php
    $mailtoyahoo
    =mail("to@yahoo.com""Hi yahoo user!""Hi, this is a test to ensure that mail to yahoo does indeed work.""From: [email]me@me.com[/email]");
    if (!
    $mailtoyahoo) {
        print(
    "Try checking to see that your host has not blacklisted yahoo.");
    }
    else {
    print(
    "Success!");
    }
    ?>
    Of course change the values accordingly. This is to just make sure that it does indeed work.

  3. #3
    Junior Member
    Join Date
    Sep 2002
    Posts
    7
    Thx. Just sent a mail from my outlook express to yahoo mail thru my Linux box. My host is not on the black list.

  4. #4
    Expert at something . . .
    Join Date
    Aug 2002
    Posts
    287
    Hm. Okay.

  5. #5
    Junior Member
    Join Date
    Sep 2002
    Posts
    7
    I found some different in header between the mail I sent by outlook and php.

    By outlook (success):
    Return-Path: <dan@founder.ca>

    By php (fail):
    Return-Path: <apache>

    My question is how to change the value for it? php.ini? I didn't c any setting there. Thanks again.

  6. #6
    Expert at something . . .
    Join Date
    Aug 2002
    Posts
    287
    Did you set the From: header in your mail with php? Do you run the server or does a host run it? It should be set to be root@yourdomain.com anyway . . . Do a phpinfo() and see what your settings are for mail.

  7. #7
    Junior Member
    Join Date
    Sep 2002
    Posts
    7
    It's me@localhost.com under sendmail_from variable. How do I change it? under php.ini?

  8. #8
    Junior Member
    Join Date
    Sep 2002
    Posts
    7

    Thumbs up

    Problem solved. What I did is define the setting of sendmail_path = /usr/sbin/sendmail -t -f webmaster@mydomain.com which is under php.ini. Thx everybody.

  9. #9
    Expert at something . . .
    Join Date
    Aug 2002
    Posts
    287
    Good.

  10. #10
    Junior Member
    Join Date
    Dec 2012
    Posts
    2
    Quote Originally Posted by vizeta View Post
    Problem solved. What I did is define the setting of sendmail_path = /usr/sbin/sendmail -t -f webmaster@mydomain.com which is under php.ini. Thx everybody.

    I'm not to good with that part of asterisk, Can you tell me where exactly you put that in to php.ini file? Maybe screenshot?
    Thx

  11. #11
    Senior Member
    Join Date
    Mar 2009
    Location
    Canada
    Posts
    794
    Quote Originally Posted by commfunction View Post
    I'm not to good with that part of asterisk, Can you tell me where exactly you put that in to php.ini file? Maybe screenshot?
    Thx
    >implying the user is going to respond to a thread that's over a decade old
    Prison of Mirrors
    Declare variables, not war.

  12. #12
    Pedantic Curmudgeon Weedpacket's Avatar
    Join Date
    Aug 2002
    Location
    General Systems Vehicle "Thrilled To Be Here"
    Posts
    21,773
    ...and wondering who said anything about asterisk.
    THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER
    FAQs! FAQs! FAQs! Most forums have them!
    Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all

  13. #13
    Junior Member
    Join Date
    Dec 2012
    Posts
    2

    Meant Linux

    Quote Originally Posted by Weedpacket View Post
    ...and wondering who said anything about asterisk.

    I meant linux (it is a asterisk machine)

  14. #14
    Pedantic Curmudgeon Weedpacket's Avatar
    Join Date
    Aug 2002
    Location
    General Systems Vehicle "Thrilled To Be Here"
    Posts
    21,773
    But this is the Windows forum....
    THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER
    FAQs! FAQs! FAQs! Most forums have them!
    Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all

  15. #15
    Senior Member
    Join Date
    Mar 2009
    Location
    Canada
    Posts
    794
    sudo start windows...
    Prison of Mirrors
    Declare variables, not war.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •