Configure Mercury mail transport system for external mail sending

Email, Infrastructure, PHP, Programming, Scripting Languages Add comments
  • english
  • german

Usually I develope my projects locally on my pc. Needless to say that you sometimes have to send an email from your script to external mail to check if everything is fine. So you need to configure your system in a way that your local apache webserver is able to send mail to external addresses.
I always use XAMPP for Windows because it contains everything you need for developing PHP applications as well as all the stuff for sending mails: fake sendmail und Mercury Mail Transport System. I reference to XAMPP 1.6.5 (for Windows) and Mercury 4.5 here. Mercury is already pre-configured in XAMPP - all settings that I don't explicitly address stay as they are :)

I'm writing this because I'm not a mail professional and read a lot of tutorials and none of them really worked. So I extracted what I needed and put it all together. An important assumption for this tutorial is that you have your own SMTP server, for example the one that your webspace hoster provides.

So let's get started:

  1. start Mercury (using the XAMPP Controlpanel) and then open the admin panel.
  2. first of all we disable the HTTP server of Mercury so that it doesn't conflict with the apache:
    1. "Configuration" -> "Protocol modules"
    2. disable the check "MercuryB HTTP web server"
    3. I also disabled "Mercury IMAP4rev1 server" because I won't need that one
    4. leave the window opened, we'll need it immediatly
  3. to be able to send external mail we have to disable "MercuryE SMTP end-to-end delivery client" in the same dialog and enable "MercuryC SMTP relaying client". Click "OK" and restart Mercury!
  4. now let's configure Mercury in general:
    1. "Configuration" -> "Mercury core module", tab "General"
    2. we want to send from localhost, therefore we check if "localhost" is the value of "internet name for this system" and adjust that if not
    3. all other settings stay the same as they are already configured, but we'll have a look to the checkboxes beneath:
    4. disable all but "Send copies of all errors to postmaster"
    5. check under the tab "Local domains" if the entry "localhost (local host or server) localhost (internet name)" is there, if not, add it
    6. click "OK" and leave the dialog
  5. next we focus on the MercuryS SMTP Server for outgoing emails:
    1. "Configuration" -> "MercuryS SMTP Server"
    2. choose the tab "General" and add a wonderful name for your SMTP server under "Announce myself as", simply fill in any name, I've chosen "CS SMTP".
    3. under "Listen on TCP/IP port" fill in "25", that's the SMTP port
    4. add "127.0.0.1" to "IP interface to use", that's the local IP of your pc. With the IP of the pc within the network (192.168.0.X) it doesn't work (at least for me)
    5. now we limit the access to the server so that only our local machine can access it:
      1. under "Connection Control" click on "Add restriction" and add the IP range from "127.0.0.1" till "127.0.0.1" (it's that simple, isn't it?)...
      2. and select "Allow connections"...
      3. and leave all checkboxes deselected
    6. with a click on "OK" we quit the dialog and we're looking forward to the next one :)
  6. now let's configure the MercuryP POP3 Server:
    1. "Configuration"-> "MercuryP POP3 Server", select the tab "General"
    2. "Listen on TCP port" -> "110" and "IP interface to use" -> "127.0.0.1"
    3. choose the tab "Connection control" and proceed as already written under 5.5 (see above)
    4. that's it already, leave the dialog by clicking "OK"
  7. now we have the important one "MercuryC SMTP Client"
    1. "Configuration" -> "MercuryC SMTP Client"
    2. to send mail to external addresses we need to have an external SMTP server. If you're renting webspace somewhere and have mail included then you normally have access to a SMTP server. My webspace is hosted at HostEurope and I'll use the SMTP of my domain. Without such an external server the whole thing won't work because domain names won't be resolved among other things. I've chosen this path because I didn't feel like configuring around the whole day.
    3. enter the address of your SMTP under "Smart host name", for example "mail.meinedomain.com"
    4. depending on the way you access the server fill the values under "Connection port/type":
      1. for a "normal" SMTP that would probably be port 25 and "Normal (no SSL encryption)"
      2. I access my SMTP via SSL, that would be port 465 and "SSL encryption using direct connection"
      3. if you have other parameters simply try around a little :-)
    5. we finally fill in the "Login username" and the "Password" that normally is supplied by your webhost and we've nearly finished...
  8. let's check the Mercury users that are normally pre-configured:
    1. "Configuration"-> "Manage local users"
    2. there should be at least the users "Admin" and "postmaster", both with administrative rights. If not you have to add them.
  9. now we finished with Mercury, but we still need to configure PHP for sending mail with our scripts:
    1. we search and open the appropriate php.ini, using XAMPP you find it under "xampp/php/php.ini" in newer version and under  "xampp/apache/bin/php.ini" in older versions
    2. we search for "[mail function]"...
    3. and we add/adjust the following:
      1. "SMTP = localhost"
      2. "smtp_port = 25"
      3. "sendmail_from = postmaster@localhost"
    4. save the php.ini and restart the Apache
  10. now everything should work! But we'll test it first:
    1. within Mercury choose "File" -> "Send mail message" and send an email for testing purposes, I've chosen to send it to my googlemail account
    2. if the windows in Mercury are at sixes and sevens, choose "Window" -> "Tile" enjoy the view
    3. within the window "Mercury Core Prozess" we'll see our test mail at first:
      1. "13:38:41 JOB XXXXXX: from postmaster@localhost (local) To: XXX@googlemail.com (non-local) (JOB XXXXXX) -OK"
    4. the mail was received in Mercury and processed, after some seconds the window "Mercury SMTP client (relay version)" should show some actions:
      1. "05 Jan 2008 13:39, Servicing job XXXXXX ...OK"
      2. if you see this message, everything went fine and the mail was sent!
      3. if you don't get the message you have to find out why, possible reasons could be:
        1. wrong connection values for the SMTP server
        2. SMTP server doesn't allow relaying (from your host)
    5. now we'll test the whole thing from a PHP script and we'll write a wonderful one-liner into a PHP file:
      1. "mail('xxx@googlemail.com', 'Mercury test mail', 'If you can read this, everything was fine!');"
      2. call the PHP file within your browser, a command window should pop up shortly (or maybe not), it's from the fake sendmail of XAMPP, and focus back on Mercury:
        1. the produre is the same as above only that the SMTP server receives the mail from php before everything else happens
        2. you can watch this in the window "Mercury SMTP Server" and should see something like this: Mercury SMTP

I hope that worked for you, if not, feel free to leave a comment but as I already said, I'm not a professional but I'll help you as far as I can!

EDIT:
If you get the error message "SMTP server response: 553 We do not relay non-local mail, sorry." while sending from PHP go to Mercury under MercuryS -> Connection Control -> "Uncheck Do not Permit SMTP relaying to non-local mail" an check this option. Should fix the problem. Thanks to ron!

Tags: , , , ,

158 Responses to “Configure Mercury mail transport system for external mail sending”

  1. Art Says:

    This is exactly what I needed to get my MM server to relay through my Gmail account.

    Thanks!

  2. Moondog Says:

    First, thanks for great tutorial about configuring Mercury Mail. Everything went fine, until….

    I sent testing oneliner php to my google account, but in Mercury SMPT Clinet (relay version) I got message:

    Bad response to AUTH command from 87.230.74.164

    Can You,please, explain me what to do?

    best regards

  3. Alex (zoe.vc) Says:

    Hm, I’d say that some of your SMTP connection values (username/password/port) are incorrect – check this first. The AUTH means that the authentification fails somewhere, and the only place we authenticate are at the external smtp server. so it seams that your values are wrong or you are not allowed to relay access the smtp…

  4. Shi Heng Cheong Says:

    After a couple of attempts, I finally got Mercury working. I was able to install Wordpress and receive the password via email. Thanks!

  5. gary Says:

    you have saved me hours…clear easy to understand instructions..thanks a bunch!!!

  6. Mike Says:

    Hi,

    Thanks for your informative article.

    Ive followed the steps and the test mail from the client works fine, however whn IO try to send an email via telnet after the rcpt to: command I get an error message sying “invalid rfc821 mailbox specification” this also causes emails from the webpage to fail.
    Any ideas?
    Thanks very much in advance for any replies!

  7. Alex (zoe.vc) Says:

    Hm, as far as I know, I never had this problem. But maybe there is a problem with special characters in the name or address that forces mercury to cancel. That’s what I found so far…

  8. Shweta S. Jugade Says:

    Thank u very much!!!

    u r an angel for me!!

    you have saved hours…clear easy to understand instructions..thanks a lot…………..

  9. Daljeet Says:

    hi…..

    thanks for the article but i am facing a problem …..

    when i try sending the mail to my gmail account i get an error, the mail sending fails

    in the window “Mercury SMTP Server” this message is displayed
    ERROR FF servicing queue job

    please help me…

  10. Alex (zoe.vc) Says:

    Seems Mercury can’t connect. Try turning on session logging in MercuryC and look what it is saying..

  11. Will Says:

    THANK YOU! I’ve spent hours trying to figure out this problem with no luck. Once I found your page it worked! Couldn’t used Gmail myself, found they it wouldn’t let it so just used other mail settings and no prob!

  12. ron Says:

    Hi, I had followed your instructions but I could not get it work Googele SMTP. Kept getting the following error:

    530 5.7.0 Must issue a START TLS command first.

    Upon searching the net I entered the following information in MercuryC SMTP
    Smart host name: smtp.gmail.com
    Connection port/type: 465 (SSL encryption with direct connection).

    google username and password.

    Did a test mail and it went through successfully.

    However when I try to send the email via PHP mail() function, I get the following error:

    SMTP server response: 553 We do not relay non-local mail, sorry.

    Please help.

    Thanks,
    Ron

  13. ron Says:

    Hey fixed the error in Mercury by going to MercuryS->Connection Control-> “Uncheck Do not Permit SMTP relaying to non-local mail”

    Regards,
    Ron

  14. Alex (zoe.vc) Says:

    That’s cool as some people reported conflicts with googlemail smtp, so this should fix their errors, thanks!

  15. rezmez Says:

    Thank you very much!!!!
    What a great tutorial you have here. It’s a big help for me. Able to set-up within one hour… thanks again

  16. Denis L. Says:

    Hat super geklappt, danke für das Tutorial. :)

  17. Daljeet Says:

    thanx for the gr8 tutorial ………..

    i’v wriitin a code in c# for sending/retrieving mails to/from mercury mail server.The sending(smtp) part works perfectly fine but have a prob with retrieving(pop).
    Connection wit the server is established , the username (user@localhost) also matches but there is problem with the password, get an error that password is incorrect/invalid … any idea y is this happenein ????
    its urgent plz help me
    my mail id is daljeethanspal@gmail.com

  18. Martin B. Says:

    Hab ewig nach dem Grund für die Fehlfunktion des MailServers gesucht und bin hier endlich auf die Lösung und einen komplett beschriebenen Weg zur richtigen Konfiguration gestoßen! Dieser Beitrag ist wirklich TOPP!

    m.f.g.
    Martin B.

    P.S.: Ein Problem existiert leider noch und ich weiß nicht, wie es zu beheben ist: Wenn ich direkt im Mailserver eine Mail versende, dann kommt sie direkt nach wenigen Sekunden bei der externen eMail-Adresse an. Versende ich aber eine Mail mit PHP, so geht diese ganz normal in die Warteschlange, wird dann versendet und als “completed” protokolliert, erreicht aber nie den Empfänger, was stimmt da nicht?!
    Wäre echt super, wenn mir jemand weiterhelfen könnte!

  19. Alex (zoe.vc) Says:

    Hm, da musst du mal die Mercury Logs auswerten und schauen was diese sagen. Denn nicht versendet ohne Fehler sollte es nicht geben. Die Kommunikation zw. PHP und Merc. scheint ja zu funktionieren, ist nun nur noch die Frage, was der Unterschied beim Raussenden ist…

  20. Retti Says:

    Hy
    erstmal: hilfreiches Tutorial, ich weiss nicht, wie lange ich gebraucht hätte, um all jene Konfigurationen selbst vorzunehmen.
    Aber…
    Als ich ein Mail direkt via Mercury verschicken wollte, kam eine Meldung:
    ERROR FF servicing queue job
    Ich habe im Session Logging nachgeschaut:

    20:59:04.156: << EHLO 127.0.0.1
    20:59:04.281: >> -ERR command not understood
    20:59:04.296: << HELO 127.0.0.1
    20:59:04.421: >> -ERR command not understood

    Nun, ich weiss nicht wo suchen… Ich habe nirgends ein Kommando eingegeben.

  21. Alex (zoe.vc) Says:

    Puh, da weiß ich nun auch nicht. So tief stecke ich dann im Mercury auch nicht drinne, sorry. Schonmal Onkel Google befragt?

  22. Andre Luiz Says:

    Hello .. is giving error!

    I am using the SMTP Client:
    smtp.gmail.com
    andreluiz.bsi
    xx_password_xx
    Port: 465

    It appears the error: Error FF servicing job queue.

    When I put the prta 25 appears: 530 5.7.0 Must issue a STARTTLS command first. s40sm4521563hsb.18

    I am using the window of sending email from the mercury ..

    I await answers

  23. Alex (zoe.vc) Says:

    Hm, I never tried the SMTP of Googlemail. You should check the logs for a more detailed error message.

  24. Maryam Says:

    Hello,

    Thanks for great help,It was really really nice and complete tutorial ,I was really confused with other tutorials but urs was gr8!

  25. smith Says:

    hi i am trying this to work on my localhost.
    my STMP doesnot require authentication. so where should I check or uncheck to avoid SMTP authtentication?

    2nd.) I am getting this error or problem
    postmaster@localhost – Notification discarded – potential loop.

    and it doesn’t send the email to my gmail or any external email

    plz help
    thanks

    Great tutorial though

  26. Abraham Says:

    Thanks for this great tutorial…really appreciate your time and effort.

  27. Kevin Says:

    Thank you so much! Finally, I have been looking for these simple instructions for a month now, you lay it out exactly and thoroughly. I was quickly up and running sending confirmation e-mails out from Drupal using Mercury Mail on XAMPP after reading your post. Thanks again!

  28. Neo Says:

    Das Tutorial hat soweit ganz gut geklappt, ich kann mails von “neo@meine-seite.ath.cx” (DNS-Adresse) an mein freenet-postfach schicken. aber wenn ich eine mail von freenet an meine dns-adresse schicke, kommt die mail nie an, ich weiß nich worans liegt…

  29. Safdar Says:

    I must say “SUPERB!”

  30. mp Says:

    Those who gets error like: “SMTP server response: 553 We do not relay non-local mail, sorry” when sending mail with php or when you get error in Mercury: “domain of server address postmaster@localhost does not resolve”. what worked for me was to change in Mercruy, Configuration-> Mercury Core Module -> Internet Name for this system – i changed from localhost to localhost.com and for php, change line: “sendmail_from = admin@localhost.com” .com is what did the trick. I use Mercury/32 v 4.01b.

  31. Lorenz Says:

    Danke! Hat alles super geklappt, bis auf das versenden von Mails durch PHP. Ich hab auch keine Fehlermeldungen bekommen.

  32. Mitchell Mumpower Says:

    Thank you so much!

    You have saved me hours and hours of time!

  33. Sven H. Says:

    Das Tutorial ist einfach nur genial!!!
    Danke, saß schon Stunden dran und mit deinem Tut gings sofort!!!

    :-)

  34. Brian Van Watson Says:

    Great article!! Worked like a charm. However, I did receive a few TCP/IP errors from Mercury. But when I changed the time out settings on MercuryS SMPT Server from the default 30 seconds to a higher number like 60 I was able to send mail.

  35. bonnie Says:

    First,3X very much for your hard work.I followed your steps and finally got that:
    My wikisite says “Confirmation e-mail sent. ” without any error.
    But my email(external) received nothing.Wiki send it from postmaster@localhost.
    what will be the cause of the problem?
    plz help
    thanks

  36. bonnie Says:

    Meercury SMTP Server Connection history:

    Connection from 127.0.0.1, Thu Jul 17 16:56:04 2008
    HELO E001CC454D6AD
    MAIL FROM:
    RCPT TO:
    DATA-19 lines,759 bytes.
    QUIT
    0 sec. elapsed,connection closed Thu Jul 17 16:56:04 2008

    Does the localhost send the mail?
    Why quit? Does it mean that the system failed in sending the email?

    Many thanks,bonnie

  37. Alex (zoe.vc) Says:

    Well, with the configuration I wrote there is never any output within the server connection history of the SMTP. Only the core process and the relay SMTP show their data.
    Have you tried sending a mail from mercury (File->Send Mail Message) and does that work?

  38. cubix Says:

    Andre Luiz,

    You have to configure the SMTP relay client to use the STARTTLS command.

    1. To do so select configuration -> MercuryC SMTP Client.
    2. In the Connection port/type write 587 as the port and from the dropdownmenu select “SSL encryption via STARTTSL command”.
    3. Click OK

  39. Alistair Says:

    Hi, I get the “notification discarded – potential loop” response when I try to send a test email in Mercury. Any thoughts on what the problem could be here?

  40. frag_em_all Says:

    Invaluable help, thanx

  41. joy Says:

    question, what if you do not have mail servers yet and you are just trying to check whether it your php program is working or not. I am using gmail as my mail, i dont know about the step number 7. well, i test if the fields are working correctly, well, it is working ok. but i would just like to check if my code is working. thanks

  42. Alex (zoe.vc) Says:

    for real? I don’t know. Think you can’t check it this way. I probaby would output the strings I try to send to a logfile and check them there.

  43. boy Says:

    Hi,

    I did all the above suggested setting and still fail to send e-mail using my installed mercury/32 4.6

    Here is what I observed.
    1. MercuryC/statistics shows that the categories “tcp/ip connection failure, tcp/ip errors during processing & total remote job process” were all incrementing.
    2. Mercury Core Process revealed “OK” notification.
    3. Mercury SMTP client output showed “Failed Error FF servicing queue job”.

    Hope you can guide me further since I really need this service.

    Waiting for your immediate response.

    Thanks Alex!

  44. Alex (zoe.vc) Says:

    Maybe your error source is the same as here: http://objectmix.com/pegasus/203366-tcp-ip-error-mercurye.html

  45. boy Says:

    I already tried to increase the timer but still the same result.

    Hope you can still help me on this.

    Thanks!

  46. Alex (zoe.vc) Says:

    I’m sorry, but I don’t know any further…

  47. Miguel Angel Says:

    Thanks! I finished the configuration of my mercury server right now and it works perfectly. Greetings from Spain

  48. Imran Says:

    Thanks brother for such a great tutorial! its really very impressive.
    My all first 10.4 Steps are successfully executed, but I got this error “SMTP server response: 553 We do not relay non-local mail, sorry. in C:\xampp\htdocs\xampp\send_mail.php on line 2″ in executing last 10.5th step please solve my problem

    send_mail.php is file that only is having one line of 10.5th step’s code I am waiting for your response.

  49. Alex (zoe.vc) Says:

    @Imran
    check MercuryS -> Connection Control -> “Uncheck Do not Permit SMTP relaying to non-local mail”

  50. aphex3k Says:

    Alter Schwede, danke schön. du hast mir einen Haufen Arbeit erspart!

  51. Crusho Says:

    Well I taste now with my php script but know I have this new issue:

    555.5.5.2 Syntax error. 7sm1035702

    Any suggestion???

  52. Steve Says:

    Hi!

    Although I get the OK message, then there is another one:
    postmaster@localhost – Notification discarded – potential loop. And the mail has not been delivered to the external mailbox (gmail and a couple of others). Any ideas why not?
    Thanks!

  53. Alex (zoe.vc) Says:

    Hm, unfortunatly not really…

  54. sudheer Says:

    It helped me a lot.

  55. Thomas Kammer Says:

    Ich bekomme auch diese blöde meldung
    postmaster@localhost – Notification discarded – potential loop.
    beim versuch via mercury selbst ein test mail ab zu schicken!
    was ist hier zu tun?
    Bitte um Email-Kontakt – Danke!!!

    Häng hier schon wieder 3 Stunden an einem Programm und die eigentliche Entwicklung bleibt liegen :-( ist echt zum ko**** manchmal!

  56. Thomas Kammer Says:

    hab nen anderen account genommen und nen anderen absender.. was davon jetzt ausschlag gebend war – ka…

  57. Lothar Bennert Says:

    Hallo Ihr Lieben,

    auch ich hab lange gebraucht, bis ich eine Lösung gefunden habe. Ich habe den Maercury-Mail Server in ein Server-Paket verpakt, und nun kann man damit WebHosting betreiben, und Mailadressen erstellen, soviel man will. Allerdigs ist es erforderlich, das in der Server-Verwaltung ein sogenanntes Mailrelay eingetragen wird…

    Mehr Infos findet Ihr unter http://wht.ath.cx !

    Ach ja, ist die Webseite mal nicht erreichba, dann verzweifelt nicht gleich, versucht es Später noch einmal…

    MFG

  58. rene Says:

    Hi:
    thanks for the guide; when I send an email mercury process my request and everything seems to be perfect…..but the mails never reachs the destinatary (example: I send an email to myself “rmtarget@yahoo.com”, and i never receive it). please help me with this matter. thanks a lot in advance

  59. Ian Says:

    Hi,
    thanks for this useful guide.
    But may i ask why when i use…
    MyName For example.
    It shows an Error 501, bad name.
    How do i do it in a way there is like something to mask over my e-mail?
    e.g.
    Customer Service
    Without having errors?
    This is for the From address.
    Thank you very much

  60. yinka Says:

    this is the best guide ever.

  61. George Says:

    Great guide!!! i was searching for 2 days and didnt find anything like this! great work, thanks!

  62. guyven69 Says:

    thanks, this is great.i spent almost a month just to configure a local smtp server.
    I used the smtp port from webhost and it works.

  63. Martin Says:

    Hallo Freunde

    kennt jemand das Problem?

    Wenn ich ein Testmail von Mercury sende kommt das an, auf anderen weg ( testmail.php ) klappt das nicht, auch nicht wenn ich den Trick mit “Uncheck Do not Permit SMTP” versuche. Es fehlt dann nur die Fehlermeldung mit “SMTP server response: 553 “… Wäre nett wenn mir da einer weiterhelfen kann. lg Martin

  64. wm2k6 Says:

    Hallo :-)
    Vielen dank für das super Tutorial^^
    ein kleines Problem habe ich aber und zwar zeigt Merc keine Fehler an, nur kommen die mails die ich an meine googlemail schicke nicht bei googlemail an.
    Woran kann das liegen?

    mfg Wm2k6

  65. Mark Says:

    Thanks for this Great Guide!!!

  66. Rich M Says:

    Excellent work, you saved me oodles of time.

    Only problem I had was that my ISP’s SMTP relay server doesn’t like mail from postmaster@localhost, I got this error message in the log (which BTW I recommend enabling in the MercuryC config panel).

    E 20081118 173631 1744 550-Verification failed for

    I simply changed the line
    “sendmail_from = postmaster@localhost”
    in the php.ini file (see 3.3) to something like..
    “sendmail_from = postmaster@mydomain.com

    Which seems to have resolved the issue.

  67. John Says:

    You are the bomb! I can’t thank you enough for this great info.

  68. Frank Says:

    You Rock!

  69. didier Says:

    I’ve executed all the steps and controlled several times but still get the following message in Mercury SMTP Client (relay version) window:

    501 #5.1.3 Partial domain not allowed: ‘localhost’

    BTW, very comprehensible explanation, thanks!

    Didier.

  70. Louise Says:

    Excellent, just what i have been searching the net for. Thank you!

  71. doc_fumanchu Says:

    Great tutorial, thx.
    Sending mails out from mercury works well.
    But when i try it from a .php – file i get this:

    Warning: mail() [function.mail]: “sendmail_from” not set in php.ini or custom “From:” header missing in C:\xampp\htdocs\phpBB2\testmail.php on line 10

    How do i handle this?

  72. doc_fumanchu Says:

    ok. it works. thats the 553 … thank you

  73. Stefan Says:

    Ahoi,

    sehr gute Anleitung. Vielen Dank dafür, es hat direkt funktioniert.

    Grüße

    Stefan

  74. Chris Says:

    Hi,

    Lob erst einmal für diese hilfreichen Seiten.

    Habe das Problem, wenn ich aus meiner PhP Anwendung ein Mail versende, dass ich folgende Fehlermeldung bekomme:
    555.5.5.2 Syntax error.
    Mailversand vom Server aus funktioniert, aber.

    Hat jemand einen Vorschlag? Danke schon einmal im Voraus.

    Gruss Chris.

  75. Lothar Bennert Says:

    Hallo Chris,

    schau Deinen PHP Code genau an, manchmal ist es ein einfacher flüchtigkeitsfehler, der einen zum verzweifeln bringt. Scnell ist es passiert, und man hat statt eines Kommas einen Punkt gesetzt. Der Fehler liegt möglicherweise in einer der PHP Dateien…

    Übrigens, ich hatte auch das Problem mit dem Mailversand. Übrigens, wer’s einfacher haben möchte, hier ein Tipp: Statt des Xampp ein WebHosting-Total Server-Paket nutzen, da ist alles ferig vorkonfiguriert. Auch der Mailserver ist… ereits fertig integriert. Leider momentan noch mit PHP 4, aber das soll sich bald ändern…

    Gruß Lothar, und viel Erfolg beim basteln..

  76. komensky Says:

    hallo auf meiner webseite …interest.htm ist ein link zu meinem wordpress -blog. nach dem registrieren soll der neue user eine mail mit passwort bekommen. dies funktioniert mit meinem mercury -einstellung z.zt. nicht. ich habe die installation wie oben beschrieben gemacht. dafür herzlichenm dank. ich bekomme die meldung “user not knowm on this site…”

  77. Chris Says:

    Danke Lothar für die Antwort. Aber das Problem tritt nur beim Mercury Server auf. Beim WebHosting bei einem Provider lässt sich aus der PhP Anwendung ohne weiteres ein Mail verschicken.

    Habe jetzt mal MercruyE Konfiguriert, dort kommt die Fehlermeldung mit der man mehr anfangen kann:

    Testmail direkt vom Server: (funktioniert)
    Resolved MX for ‘xxxxx.de’ to 123.123.123.123
    Conecting to 123.123.123.123
    Mail from:
    RCP to:
    DATA
    [356 Byte]Message accepted for delivery by 123.123.123.123

    Das ganze jetzt von meiner PHP Anwedung heraus: (hier funktioniert der Versand nicht!!!)
    Resolved MX for ‘xxxxx.de’ to 123.123.123.123
    Conecting to 123.123.123.123
    Mail from:
    RCP to:<karl meier
    501.5.5.4 Invalid Address

    Liegt es an dem Namen der mit übergeben wird? Wie kann ich die Konfiguration ändern, damit der Namen auch akzeptiert wird.

    Danke für Eure Hilfe.

    Gruß

    Chris

  78. Chris Says:

    Da scheint die eMailadresse falsch interpretiert zu werden, also noch ein versuch:

    Danke Lothar für die Antwort. Aber das Problem tritt nur beim Mercury Server auf. Beim WebHosting bei einem Provider lässt sich aus der PhP Anwendung ohne weiteres ein Mail verschicken.

    Habe jetzt mal MercruyE Konfiguriert, dort kommt die Fehlermeldung mit der man mehr anfangen kann:

    Testmail direkt vom Server: (funktioniert)
    Resolved MX for ‘xxxxx.de’ to 123.123.123.123
    Conecting to 123.123.123.123
    Mail from:
    RCP to:
    DATA
    [356 Byte]Message accepted for delivery by 123.123.123.123

    Das ganze jetzt von meiner PHP Anwedung heraus: (hier funktioniert der Versand nicht!!!)
    Resolved MX for ‘xxxxx.de’ to 123.123.123.123
    Conecting to 123.123.123.123
    Mail from:
    RCP to:<karl meier
    501.5.5.4 Invalid Address

    Vielen Dank für Eure Hilfe

  79. Michael Brown Says:

    555 5.5.2 SYntax error. 30sm2821767yxk.57

    failed

    taht is the error i get

  80. arungandhi Says:

    Hi Thanks. Its working.. Really Great

  81. Mujahid Khan Says:

    Thanks so much for the excellent article. This article really beats the pants out of many a professional manuals.

    Please accept my humble donation. If I had more I would have gladly sent more. We need knights like you.

    Keep up the great work. I really enjoyed the succint way you outlined to configure Mercury mail.

    Can you please point a newbie like me to a site which explains how windows work. I mean the jargon like .ini, .cgi ‘bin’ etc.

    M Khan
    Princeton, NJ

  82. kilkul Says:

    Man, this article is bookmark material!

    Thanks a bunch, I’ve been pondering about sending e-mails from xAmpp for years (it’s true that I’ve never REALLY tried to understand it, but… you’ve lit the light!).

    So, THANK YOU, you’ve got my vote!

  83. massive142 Says:

    rene Says:

    Oktober 1st, 2008 at 1:51
    Hi:
    thanks for the guide; when I send an email mercury process my request and everything seems to be perfect…..but the mails never reachs the destinatary (example: I send an email to myself “rmtarget@yahoo.com”, and i never receive it). please help me with this matter. thanks a lot in advance

    same problem…great tutorial…..my website will process it and mercury recieves and processes but it will never complete the job an send…

  84. Yoke Lee Says:

    Hi!

    Thanks for the great step-by-step very comprehensive tutorial!

    Permission to print as hand-out please! (only for my personal reference)
    If only you have the printer-friendly version… hmm…

  85. Frank Mohnhaupt Says:

    Erst mal vielen Dank dafür das Du Dir diese Arbeit gemacht hast. Ich habe lange nach einem verständlichem Tutorial gesucht und leider nichts gefunden.
    Mit Deinem Tutorial hats dann endlich geklappt.Suuuper erklärt, leicht verständlich und fachlich völlig korrekt. Da können sich einige “PROFIS”* (???) ein Beispiel dran nehmen. Weiter so und viel Erfolg !

    *wenn einen Profi auszeichnet das man nix versteht kann die Welt auch drauf verzichten ! ;-)

  86. Marnus Says:

    Awesome, helped enormously!! Thanks for posting it!!

  87. Shaun Harvey Says:

    What a brilliant tutorial, seriously I just had to comment because it was such a great help to me, will be bookmarked and saved in a personal folder.
    Good Job!

  88. QMaiki Says:

    Really nice tutorial, thanks a lot,
    I have justone question, is there a way to configure Mercury to catch all eMails with correct domain, but unknown user to one single email-account?
    something like
    .*@localhost –> catchAll@localhost

    My webspace provider has such a feature and I can’t figure out on how to configure Mercury that way..

  89. Ich Says:

    Nettes Tutorial.
    Lokal funzt alles einwandfrei.

    Hab aber noch Probleme:
    Um Emails von externen Servern zu empfangen benötige ich keinen weiteren SErver oder?

    Wenn ich Emails an blubb@[meineIP] was schicken will kommt nix an.
    Die benötigten Ports sind offen.
    Was mache ich falsch?

    Und was muss ich tun, damit mein pop3 postfach auch extern abrufen kann?

  90. Dave Says:

    QMaiki: I couldn’t find a way to make Mercury mail do a “catch all” email box either, so I set up a “Domain Mailbox” that’s pretty close. You define a new domain “localhost.net” and set it up so that all mail sent to that domain goes to a single mail box.

    1. “Configuration” -> “Manage Local Users…”, “Add” button.
    2. Create the “catchAll” email box where all email is to go.
    3. “Configuration” -> “Mercury Core Module.”, “Local Domains” tab, “Add new domain”.
    4. Set “Local host or server” to “DM=catchAll”. (DM means “Domain Mailbox.” Click Help button for explanation).
    5. Set the “Internet name” to “localhost.net” and click OK to save.

    The one flaw is that ALL email sent to @localhost.net will go into the catchAll box, regardless of whether the user name is defined or not. And, all of the addresses you want to go into the catchAll box must be @localhost.net instead of just @localhost. But it’s good enough for testing.

  91. Dave Says:

    I was having the same problem as bonnie, rene, and massive142 – everything sent fine, no errors in logs, but the email never arrives at the destination. What fixed it was the change recommended by mp on June 27th, 2008 at 2:17 to change from “localhost” to “localhost.com.” Thanks very much!

  92. Nguyen Xuan nghia Says:

    I set:
    [MercuryC]
    Host : localhost
    Failfile : C:\xampp\MERCURYMAIL\Mercury\FAILURE.MER
    HELO : JMB
    Poll : 30
    Scratch : C:\xampp\MERCURYMAIL\Mercury
    ReturnLines : 15
    Timeout : 30
    ESMTP : 1
    Server_Port : 25
    SMTP_Username: postmaster
    SMTP_Password:
    SMTP_ConnFlags : 8
    POP3_Auth : 0
    Log_Verbose : 0

    [MercuryE]
    Poll : 15
    Timeout : 60
    # Session_logging : o:\mail\mercury\melogs
    # Session_logmode : 1
    # Nameservers : 139.80.64.1

    [MercuryD]

    is it true???
    thanks

  93. harsh Says:

    Thank you very much for very nice tutorial. Could any one tell me can we send external mail (e.g to hotmail account) using only this (mercury) server, without pointing any online server.

    I can send mesage to internal server but unable to send external server.

    Thanks

  94. Dan Says:

    hello, pls help me, when I send mail via mercury mail, it s succed, but when I try using php (mail(‘xxx@googlemail.com’, ‘Mercury test mail’, ‘If you can read this, everything was fine!’);) I don’t receive the message, but I don’t get any error.

  95. gezahorvat Says:

    DANKE!!!!
    Du hast mir mein Leben mit diesen ewigen E-Mail Problemen total erleichtert. Endlich konnte ich in 5(!) Minuten all meiene Probleme lösen…
    Mußte nur noch zusätzlich “Do not Permit SMTP relaying to non-local mail” in den SMTP-Server-Einstellungen weg-hacken.

    Super Anleitung!

  96. Zoltan Says:

    Thanks a lot for this tutorial. I spent half a day to solve this problem… Many thanks!

  97. James Says:

    I’m studying it. But it’s too hard for me. Thank you for your tutorial, although I don’t know that is why still.

  98. James Says:

    But how to send mail through your own SMTP, not relay?

  99. sag Says:

    Thakss aton man..gr8888 Article

  100. Robert Says:

    Fantastic. Your post has saved me hours and hours of time. The setup worked immediately. I would have never figured this out myself.

  101. Alex Says:

    Thnx!

  102. Dwayne Says:

    Excellent tutorial! Worked like a charm! Thank you!

  103. Frank Says:

    Amazing tutorial, everything working until sending mail through PHP. I got the same error as Crusho:
    555.5.5.2 Syntax error. 7sm1035702
    The mail is not relaid in that case.
    Cause:
    In my case the header contained causing a syntax error when being processed by gmail.
    Solution: Make sure your header is
    $sender = “myemail@mydomain.com”;
    $headers =”From: “.$sender.”\r\n”;

  104. Frank Says:

    The blog filtered: In my case the header contained tags (like greater or smaller than) causing a syntax error when being processed by gmail.

  105. alemao Says:

    Thank you my friend.. These all worked for me…
    Perhaps the page below is useful for anyone using gmail free smtp server
    http://lifehacker.com/software/email-apps/how-to-use-gmail-as-your-smtp-server-111166.php

  106. Andy Says:

    Many thanks for putting the time and effort in to make this tutorial and help others – this worked perfectly for me.

  107. Flo Says:

    Wow! Can’t say enough to thank you. I have been working with a XAMPP test server for years but have not been able to get the Mercury environment set up correctly like this. Your instructions for this process are the best on the Web. I rate your tutorial 10 out of 10!

  108. SMTP zum senden von Mails verwenden! - php.de Says:

    [...] Anleitung wie man Mercury einrichtet um Mails über nen anderen Anbieter via SMTP zu versenden: Configure Mercury mail transport system for external mail | zoe.vc Die Frage die sich mir aktuell noch stellt, handelt es sich hier um nen zuhause hinter der [...]

  109. sas Says:

    555.5.5.2 Syntax error

    mails are sent by drupal, headers should be ok.

  110. วิธีตั้งค่า mercury mail ให้ส่ง email ออกจาก localhost ได้ « EkBp Says:

    [...] http://www.zoe.vc/2008/mercury-mail-transport-system-fur-externe-mail-konfigurieren/?lan=english [...]

  111. Ashish Says:

    Thanks a lot… i am doing an internship and was assigned this work. I was new to xampp and was badly stuck then you appeared like messiah for me. Thanks a lot again!!

    I have a little question. i want to send whole html form information in form of an email. how can i put everything in $message that too in a specified format.

  112. asim Says:

    Thank you so much… :)

  113. Rubira Says:

    Great tutorial! thanks!!

  114. Transport Spain Says:

    Thanks for valuable information and better tips about using the xampp and developing the php application.

  115. koyama Says:

    Best software configuration tutorial ever!

    I initially got this error message when I tried to to request “Forgotten password” in Drupal on XAMPP.
    SMTP server response: 553 We do not relay non-local mail, sorry.

    But comment #12 from ron helped me out with this, so thanks to him as well.

  116. roblesrt Says:

    i can’t get it to work using localhost only.

    I followed mp on his comment Juni 27th, 2008 at 2:17

    changed localhost to localhost.com and it works on the mercury admin window, will test with php script next.

    thanks a lot :)

  117. roblesrt Says:

    Created a test mail using php script and it works!
    Thanks again :D

    Be sure to follow the following line:

    If you get the error message “SMTP server response: 553 We do not relay non-local mail, sorry.” while sending from PHP go to Mercury under MercuryS -> Connection Control -> “Uncheck Do not Permit SMTP relaying to non-local mail” an check this option.

  118. lars Says:

    danke für die anleitung!
    klappt übrigens auch wunderbar z.B. mit googlemail:

    im MercuryC SMTP Dialog folgendes eintragen:

    Smart host name: smtp.googlemail.com
    Connection port/type: 587/SSL encryption via STARTTLS command
    Login username: deinbenutzername@googlemail.com
    Passwort: dein googlemail passwort

    mfg

  119. iwan Says:

    i tried the above instruction, but apprently i still cannot send and recieve email. may be because my network uses proxy server. that might be block the particular port? or may be i can get some help to setting it up.

    it got error message :

    error FF servicing queue job.

    thank you

  120. hub Says:

    Danke für diese Anleitung. Hat mir Zeit und Nerven gespart. Bei mir lief es mit der rechnereigenen IP, nachdem ich bei POP und SMTP – Server und Client localhost gegen meine IP ausgetauscht hatte.

  121. Head First PHP & MySQL Chapter 1 – Mercury Mail SMTP Problem « The Technical Me Says:

    [...] here’s the fix to the problem. [...]

  122. Puja Says:

    Hi, I am trying to setup Mercury on my machine and have broadband connection. I am able to send mail to the external servers like gmail, and receive mails locally, ie, between two users on the Mercury. But, I’m not able to receive external mails, for example I tried mailing myself from gmail. I do not have a domain name, so am using my machine’s IP as SMTP server and POP3 server. Any help will be greatly appreciated.

  123. Gottchi Says:

    Vielen Dank, ich habe wochenlang selbst experimentiert.
    Bis ich endlich diese Anleitung gefunden habe, und alles sofort geklappt hat.

    Besten Dank….

  124. test Says:

    Greetings!

    I got error message in SMTP Client(relay version):
    Error FF servicing queue job.

    the logs:
    17:16:52.333: Connect to ’smtp.gmail.com’, timeout 30.
    17:17:13.393: 15: Peer connect failure

    My OS is Windows Vista & I used xampp-win32-1.6.6-installer

    thank you

  125. vidit Says:

    best ultimate …….!!!
    thank u very much…..
    great job man…

  126. llalexx Says:

    thx
    u are the best

  127. bored Says:

    sorry does’nt work at all

  128. Jhorie Says:

    Almost everything went well. How can I send a message from hotmail to my MM. I can send to hotmail. I have opened my stmp and pop3 ports/25 and 110. But it doesn’t work.

  129. sms Says:

    very useful info

  130. david Says:

    Did you write this article. It looks like other sites are copying you verbatim or linking/embedding your article without giving you credit.

    http://moonmobile.blog.epochtimes.com/article/show?articleid=7887

  131. Alex (zoe.vc) Says:

    Hey David,
    thanks for the tipp. This site seems to embed all contents kind of unfair. Let’s see what I can do.

  132. klaus Says:

    gut gemacht! hat mir eine menge zeit gespart!
    Merci

  133. Mayo Says:

    hallo david,

    danke für die reichhaltige anleitung! habe lange nach etwas so einfachem wie deiner anleitung gesucht und nicht gefunden. dank dir kann ich jetzt meine mailformulare lokal testen.

    danke!
    mayo

  134. Robinio Says:

    Sehr, sehr, sehr hilfreiche Anleitung! Vielen Dank!

  135. suzie Says:

    hi, thanks for the great info.. btw i manage to send n retrieve email locally. when i send to my yahoo mail, everything look perfect but i did not receive the mail. i’ve tried using localhost.com, also cannot retrive the mail. can somebody please help me…really need your help…Thanks in advance…

  136. suzie Says:

    hi again..
    what if i use gmail smtp, any other changes at mercuryS n mercury core module? How about in php.ini? do i need to change the SMTP=localhost to smtp.gmail.com n the smtp port?

  137. Alex (zoe.vc) Says:

    If you use the gmail stmp it should work as I described for my smtp, simply add the url to the smtp into “Smart host name” on Mercury SMTP. If the port is other than 25 you should adjust this value in your php.ini.

  138. saranya Says:

    Thanks for ur useful info:)

  139. Robstah Says:

    DAMN!!!!!!!! Doesnt work for me :@

  140. Piet Van de Ven Says:

    Just would like to thank you for the time you’ve spend to figure this out. For me, your tutorial worked perfectly. Thanks again.

    Kind regards,

    Piet

  141. Darkseth Says:

    11 Jan 10 09:27, Servicing job MO0014C8… 550 5.7.1 Client does not have permissions to send as this sender
    Ich hab jetzt lange gesucht und nichts gefunden… Könnte mir jemand helfen?

  142. Alex (zoe.vc) Says:

    über welchen SMTP-Provider schickst du denn?

  143. Darkseth Says:

    also der fehler hat sich erledigt, jezz hab ich aber nen neuen xD Error FF servicing queue job

  144. Alex (zoe.vc) Says:

    Da kann sich Mercury nicht zum SMTP verbinden. Am besten mal Session Logging anschalten und schauen, was es sagt.

  145. Antonio Kobashikawa Carrasco Says:

    Thank you very much! I followed your instructions but, in my case, I observer MercuryC and others offline, also telnet localhost 25 say me “Could not open connection to the host, on port 25″. I found is a bug of MercuryX, so I disabled it. Then SMTP function well :)

  146. Christian Says:

    For the Syntax Error with PHP (probably together with WP) try this in the WordPress pluggable.php at
    function wp_mail($to, ….){

    if ( strpos($to, ‘<' ) !== false ) {
    $new_to = substr( $to, strpos( $to, '’, ”, $new_to );
    $to = trim( $new_to );
    } else {
    $to = trim( $to );
    }

    I’ve placed this directly after the function header and it works fine.

  147. Kamikaze Says:

    Hy david.please help me.i did exactly as you said but it’s not working at all…and my mercury smtp client and server, both sais OFFLINE..what can i do?

  148. Alex (zoe.vc) Says:

    Hey Kamikaze, I’m Alex, not David ;)
    If your mercury is offline, than it somehow can’t obtain an internet connection.

  149. Kamikaze Says:

    sorry alex.i fix it ;-) it was as simple as desabling al oder protocols(modules) but not the 2 POP3 AND 2 SMTP(server and client).but now i want to know how to receive mail on mercury,from a non-local mail like my friend’s e-mail [at] yahoo. thx

  150. samho Says:

    thanks bro, you have save me many hour

  151. Elke Says:

    Hallo Alex

    Das Tutorial ist super, ganz herzlichen Dank!

  152. Lt_Drawin Says:

    Hey,

    Danke, so etwas suche ich schon länger, jedoch klappt es bei mir nicht:
    Bekomme keine Fehlermeldungen, wenn ich es im Mercury teste als auch mit php. Jedoch kommt keine Mail an.
    Jemand eine Idee?

  153. Joe Says:

    I was looking for this kind of tutorial for over an hour on Google – just what I needed! Thanks so much!!

  154. Shreyo Says:

    Great job! it really worked. i sent using my gmail to yahoo and it got delivered right at the inbox.

  155. Ruby Beez Says:

    Hello Alex,

    It’s really an awesome tutorial!! Good job!! Thank you so so so much!! :)

  156. Martin Says:

    Great Tutorial!
    I am receiving emails now from “wordpress@servername”
    Where is that defined?
    I’ve setup wordpress as an intranet site, but our internal mail server doesnt like it and warns it could be spam. I’d like to change it to “sitename@internaldomain” so the mail server likes it.
    I’d rather do this than create an exception rule.
    Thanks in advance. I looked in php.ini but thats doesn’t appear to be the spot.
    Martin.

  157. Wayne Says:

    Thanks for your help with this document. You saved me days or more. I hope the rest of my project works as well as implementing mercury mail with your instructions. My config and project is, xampp 1.7.3 on my Windows 7 Lenovo SL510 notebook computer. Using Drupal or Joomla with mailman depending which will allow me to implement mailman the easiest.

  158. Lasantha Says:

    thanx man… great tutorial… I tried it for long period and finally did with ur support. thanx dude.. :D

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Anmelden