Hallo,

I like to use wita apache/php on my windows localhost to send mail by using a extern smtp server. But i get this error:

Warning: mail() [function.mail.html]: SMTP server response: 554 <mail@doamain.com>: Recipient address rejected: Access denied in c:\wwwroot\htdocs\folder\kenteken\check_numbers.php on line 172

what do i wrong?

my ini settings:
[mail function]
; For Win32 only.
SMTP = smtp.myserver.com

; For Win32 only.
sendmail_from = "me@myserver.com"

    Hi,

    I guess that the external SMTP server rejected to accept the mail for delivery because that server doesn't allow relaying. That server might be configured to accept mails only for email addresses that belong to the domain(s) the server has been configured for (or the specified mail account doesn't exist on that server).

    Thomas

      Hallo Thomas,

      Danke für deine Antwort.

      In the meantime i found some information about that a localhost doesn't have a domain and that's also a reason why mailing from a localhost brings up some problems.

      I think i try to find a smtp-server which allows realying or i use somnething like Jana Server or postcast (while postcast needs a lot system resources) on my local machine

        that's the secret:

        Use the right smtp-server!

        It works (i hope also in other networks) 🙂

          Take a look at www.xampp.org. This is a complete WAMP(S) solution available for Windows with many features. You can switch between php4 and php5 with just one click.

          This package contains a link to the Mercury mail server. I installed it on my windows server as a local SMTP server and it works fine so far.

          Since you already have a running Apache/PHP installation you might not be interested in installing the complete xampp package but the mail server is a nice one.

          Thomas

            Is it possible to install only the mailserver?

              Yes,

              the second link in my last post opens the overview page of the Mercury mail server. There is a download link in the menu of that page.

              Thomas

                Hallo Thomas,
                i got it working now but it's not easy to setup.

                Do you know if it's possible to receive this local mails within the mozilla mailclient?

                  Yes,

                  set up a new user in Mercury/32 (Configuration->Manage local users...). Then use the authentication data you chose in your mozilla mail client and use that email address in your PHP app.

                  Thomas

                    I installed mercury with smtp only is this a problem?

                      You need the POP3 server module, too (the POP3 client module isn't neccessary). You can activate the module with Configuration->Protocol modules ...

                      Restart Mercury afterwards.

                      Thomas

                        Yeah!

                        that works...Thanks.

                        I need a smtp server only for testing and sometimes without an internet connection.

                        Now everything works like i want. Dankeschön.

                          Write a Reply...