Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Aug 2008
    Location
    Trichy,India
    Posts
    312

    Problem in sending email from localhost


    Hi friends,

    I have designed and one form and php code to send mail. I am developing this in my localhost,

    So now i want to send email from my localhost to test my programming.

    I googled and i find something like editing "php.ini" file. But it didnt work for me.

    So can anyone help me and i am using wamp server.

    Thank you.
    Thanks in advance...

  2. #2
    Just Joined!
    Join Date
    Mar 2009
    Location
    Norway
    Posts
    67
    Ok, so you need help to get PHP into sending email - or is the problem that your *system* won't send email?

    For PHP to send a simple email, look at PHPs mail-function.

    If this doesn't work, make sure sendmail is configured properly:

    echo "hello world" | mail -s "testmail" your.email@example.org

    If you get this email, all is good, if not, have a look at the output from these commands:
    mailq -q
    tall /var/log/mail.err

    HTH

  3. #3
    Linux User
    Join Date
    Aug 2008
    Location
    Trichy,India
    Posts
    312
    Thanks for your rely

    For your kind information i am using windows.

    How can i use these
    Code:
    mailq -q
    tall /var/log/mail.err
    Thank you
    Thanks in advance...

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Mar 2009
    Location
    Norway
    Posts
    67
    Quote Originally Posted by shariefbe View Post
    Thanks for your rely

    For your kind information i am using windows.
    Errm.. so, you're posting a PHP-question because you're having troubles sending emails from a *windows*-machine - in a linux-forum?

    Perhaps a window-forum is better suited for your question?

  6. #5
    Linux User
    Join Date
    Aug 2008
    Location
    Trichy,India
    Posts
    312
    I am using php in wampserver. I didnt find any place to help me out.
    Thanks in advance...

  7. #6
    Linux User
    Join Date
    Aug 2008
    Location
    Trichy,India
    Posts
    312
    when i remove this '@" symbol. I am getting the below warning as

    "Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in F:\test\xampp\htdocs\sendmail.php on line 42'
    Thanks in advance...

  8. #7
    Just Joined!
    Join Date
    Mar 2009
    Location
    Norway
    Posts
    67
    Quote Originally Posted by shariefbe View Post
    when i remove this '@" symbol. I am getting the below warning as

    "Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in F:\test\xampp\htdocs\sendmail.php on line 42'
    Yeah, you need to configure sendmail (or equivalent) for windows. I'm not an expert on this, but google will help you out, add windows+smtp+howto in a google-query (stupid forum won't lett me post URLs yet )

    If you do that, then the PHP-code is at least one step closer

  9. #8
    Linux User
    Join Date
    Aug 2008
    Location
    Trichy,India
    Posts
    312
    Now i am getting this error when i attempt to use my mail form.

    Code:
    Warning: mail() [function.mail]: SMTP server response: 550-5.7.1 [122.162.237.107] The IP you're using to send mail is not authorized 550-5.7.1 to send email directly to our servers. Please use the SMTP relay at 550-5.7.1 your service provider instead. Learn more at 550 5.7.1 http://mail.google.com/support/bin/answer.py?answer=10336 f1si42544973wfp.91 in F:\test\xampp\htdocs\sendmail.php on line 43
    Please help me i got struck in this for long time....
    Thanks in advance...

  10. #9
    Just Joined!
    Join Date
    Mar 2009
    Location
    Norway
    Posts
    67
    You need to *read* the error

    Your ISP does not allow you to send emails directly from your machine - something a lot of ISPs do to battle the ever increasing amount of spam.

    Go to 'The IP you're using to send email is not authorized...' - Gmail Help and see what the ISP says

  11. #10
    Linux User
    Join Date
    Aug 2008
    Location
    Trichy,India
    Posts
    312
    Ok fine. I can understand. Now what to do for ths? Now i want to check my code whether it is working correct or not? Can anyone suggest me?
    Thanks in advance...

Posting Permissions

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