Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Aug 2007
    Posts
    74
    Thanks
    3
    Thanked 2 Times in 2 Posts

    Question Sending EMail in php

    Hi to all developers reading this thread .

    I want to send EMail in php using mail() function .
    I've installed php over IIS 7.0 (Windows vista) using php5isapi.dll .

    When I want to send mail , I get this message :

    Could not relay for SMTP agent someone@somehost.com (for example) , in Mail.php on line 9 .

    Will be really thankful to your helps

  • #2
    New Coder
    Join Date
    Apr 2007
    Posts
    89
    Thanks
    1
    Thanked 2 Times in 2 Posts
    What does your code look like?

  • #3
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,642
    Thanks
    2
    Thanked 405 Times in 397 Posts
    Did you set your SMTP server settings in your php.ini?

  • #4
    New Coder
    Join Date
    Aug 2007
    Posts
    74
    Thanks
    3
    Thanked 2 Times in 2 Posts
    No , I've not edited mail addresses in php.ini .

    I can do it on localhost but what if my website is uploaded to a registered domain ? Can I edit php.ini then ?

  • #5
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,642
    Thanks
    2
    Thanked 405 Times in 397 Posts
    More than likely your host has mail settings setup so you can send mail with mail(). You shouldn't need to change any settings(and you can't, unless you have root access) on your host.

  • #6
    New Coder
    Join Date
    Aug 2007
    Posts
    74
    Thanks
    3
    Thanked 2 Times in 2 Posts
    Thanks to all of you for help


  •  

    Posting Permissions

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