Configure Mercury mail transport system for external mail sending
Email, Infrastructure, PHP, Programming, Scripting Languages Add commentsUsually 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:
- start Mercury (using the XAMPP Controlpanel) and then open the admin panel.
- first of all we disable the HTTP server of Mercury so that it doesn't conflict with the apache:
- "Configuration" -> "Protocol modules"
- disable the check "MercuryB HTTP web server"
- I also disabled "Mercury IMAP4rev1 server" because I won't need that one
- leave the window opened, we'll need it immediatly
- 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!
- now let's configure Mercury in general:
- "Configuration" -> "Mercury core module", tab "General"
- 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
- all other settings stay the same as they are already configured, but we'll have a look to the checkboxes beneath:
- disable all but "Send copies of all errors to postmaster"
- check under the tab "Local domains" if the entry "localhost (local host or server) localhost (internet name)" is there, if not, add it
- click "OK" and leave the dialog
- next we focus on the MercuryS SMTP Server for outgoing emails:
- "Configuration" -> "MercuryS SMTP Server"
- 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".
- under "Listen on TCP/IP port" fill in "25", that's the SMTP port
- 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)
- now we limit the access to the server so that only our local machine can access it:
- 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?)...
- and select "Allow connections"...
- and leave all checkboxes deselected
- with a click on "OK" we quit the dialog and we're looking forward to the next one
- now let's configure the MercuryP POP3 Server:
- "Configuration"-> "MercuryP POP3 Server", select the tab "General"
- "Listen on TCP port" -> "110" and "IP interface to use" -> "127.0.0.1"
- choose the tab "Connection control" and proceed as already written under 5.5 (see above)
- that's it already, leave the dialog by clicking "OK"
- now we have the important one "MercuryC SMTP Client"
- "Configuration" -> "MercuryC SMTP Client"
- 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.
- enter the address of your SMTP under "Smart host name", for example "mail.meinedomain.com"
- depending on the way you access the server fill the values under "Connection port/type":
- for a "normal" SMTP that would probably be port 25 and "Normal (no SSL encryption)"
- I access my SMTP via SSL, that would be port 465 and "SSL encryption using direct connection"
- if you have other parameters simply try around a little
- we finally fill in the "Login username" and the "Password" that normally is supplied by your webhost and we've nearly finished...
- let's check the Mercury users that are normally pre-configured:
- "Configuration"-> "Manage local users"
- there should be at least the users "Admin" and "postmaster", both with administrative rights. If not you have to add them.
- now we finished with Mercury, but we still need to configure PHP for sending mail with our scripts:
- 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
- we search for "[mail function]"...
- and we add/adjust the following:
- "SMTP = localhost"
- "smtp_port = 25"
- "sendmail_from = postmaster@localhost"
- save the php.ini and restart the Apache
- now everything should work! But we'll test it first:
- within Mercury choose "File" -> "Send mail message" and send an email for testing purposes, I've chosen to send it to my googlemail account
- if the windows in Mercury are at sixes and sevens, choose "Window" -> "Tile" enjoy the view
- within the window "Mercury Core Prozess" we'll see our test mail at first:
- "13:38:41 JOB XXXXXX: from postmaster@localhost (local) To: XXX@googlemail.com (non-local) (JOB XXXXXX) -OK"
- the mail was received in Mercury and processed, after some seconds the window "Mercury SMTP client (relay version)" should show some actions:
- "05 Jan 2008 13:39, Servicing job XXXXXX ...OK"
- if you see this message, everything went fine and the mail was sent!
- if you don't get the message you have to find out why, possible reasons could be:
- wrong connection values for the SMTP server
- SMTP server doesn't allow relaying (from your host)
- now we'll test the whole thing from a PHP script and we'll write a wonderful one-liner into a PHP file:
- "mail('xxx@googlemail.com', 'Mercury test mail', 'If you can read this, everything was fine!');"
- 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:
- the produre is the same as above only that the SMTP server receives the mail from php before everything else happens
- 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!
Januar 26th, 2008 at 9:29 pm
This is exactly what I needed to get my MM server to relay through my Gmail account.
Thanks!
Januar 27th, 2008 at 1:33 pm
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
Januar 27th, 2008 at 5:03 pm
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…
Februar 1st, 2008 at 4:00 pm
After a couple of attempts, I finally got Mercury working. I was able to install WordPress and receive the password via email. Thanks!
Februar 8th, 2008 at 1:28 pm
you have saved me hours…clear easy to understand instructions..thanks a bunch!!!
Februar 13th, 2008 at 11:24 am
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!
Februar 13th, 2008 at 6:05 pm
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…
März 4th, 2008 at 9:19 am
Thank u very much!!!
u r an angel for me!!
you have saved hours…clear easy to understand instructions..thanks a lot…………..
März 25th, 2008 at 11:40 am
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…
März 25th, 2008 at 8:05 pm
Seems Mercury can’t connect. Try turning on session logging in MercuryC and look what it is saying..
April 2nd, 2008 at 4:04 am
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!
April 11th, 2008 at 11:00 am
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
April 11th, 2008 at 11:32 am
Hey fixed the error in Mercury by going to MercuryS->Connection Control-> “Uncheck Do not Permit SMTP relaying to non-local mail”
Regards,
Ron
April 11th, 2008 at 3:15 pm
That’s cool as some people reported conflicts with googlemail smtp, so this should fix their errors, thanks!
April 16th, 2008 at 4:59 pm
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
April 17th, 2008 at 5:40 am
Hat super geklappt, danke für das Tutorial.
April 19th, 2008 at 8:15 am
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
April 23rd, 2008 at 1:17 pm
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!
April 23rd, 2008 at 6:18 pm
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…
April 23rd, 2008 at 8:05 pm
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.
April 25th, 2008 at 9:38 am
Puh, da weiß ich nun auch nicht. So tief stecke ich dann im Mercury auch nicht drinne, sorry. Schonmal Onkel Google befragt?
April 27th, 2008 at 6:06 am
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
April 30th, 2008 at 12:50 pm
Hm, I never tried the SMTP of Googlemail. You should check the logs for a more detailed error message.
Mai 13th, 2008 at 7:05 pm
Hello,
Thanks for great help,It was really really nice and complete tutorial ,I was really confused with other tutorials but urs was gr8!
Mai 15th, 2008 at 7:45 am
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
Mai 26th, 2008 at 3:47 am
Thanks for this great tutorial…really appreciate your time and effort.
Juni 10th, 2008 at 12:12 am
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!
Juni 11th, 2008 at 9:36 pm
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…
Juni 25th, 2008 at 12:58 pm
I must say “SUPERB!”
Juni 27th, 2008 at 2:17 am
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.
Juni 29th, 2008 at 1:03 pm
Danke! Hat alles super geklappt, bis auf das versenden von Mails durch PHP. Ich hab auch keine Fehlermeldungen bekommen.
Juli 3rd, 2008 at 8:57 pm
Thank you so much!
You have saved me hours and hours of time!
Juli 9th, 2008 at 9:33 pm
Das Tutorial ist einfach nur genial!!!
Danke, saß schon Stunden dran und mit deinem Tut gings sofort!!!
Juli 10th, 2008 at 8:39 pm
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.
Juli 17th, 2008 at 9:41 am
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
Juli 17th, 2008 at 10:22 am
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
Juli 19th, 2008 at 12:32 pm
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?
Juli 21st, 2008 at 2:01 pm
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
Juli 22nd, 2008 at 4:35 am
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?
August 4th, 2008 at 8:05 pm
Invaluable help, thanx
August 6th, 2008 at 10:21 am
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
August 8th, 2008 at 10:54 am
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.
August 13th, 2008 at 1:15 pm
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!
August 14th, 2008 at 7:14 am
Maybe your error source is the same as here: http://objectmix.com/pegasus/203366-tcp-ip-error-mercurye.html
August 16th, 2008 at 3:26 am
I already tried to increase the timer but still the same result.
Hope you can still help me on this.
Thanks!
August 19th, 2008 at 1:33 pm
I’m sorry, but I don’t know any further…
August 28th, 2008 at 10:55 pm
Thanks! I finished the configuration of my mercury server right now and it works perfectly. Greetings from Spain
August 30th, 2008 at 8:27 pm
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.
August 31st, 2008 at 11:53 am
@Imran
check MercuryS -> Connection Control -> “Uncheck Do not Permit SMTP relaying to non-local mail”
September 8th, 2008 at 4:07 pm
Alter Schwede, danke schön. du hast mir einen Haufen Arbeit erspart!
September 10th, 2008 at 12:48 am
Well I taste now with my php script but know I have this new issue:
555.5.5.2 Syntax error. 7sm1035702
Any suggestion???
September 11th, 2008 at 11:31 pm
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!
September 12th, 2008 at 6:21 pm
Hm, unfortunatly not really…
September 16th, 2008 at 6:41 pm
It helped me a lot.
September 23rd, 2008 at 2:24 pm
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!
September 23rd, 2008 at 2:34 pm
hab nen anderen account genommen und nen anderen absender.. was davon jetzt ausschlag gebend war – ka…
September 30th, 2008 at 5:59 pm
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
Oktober 1st, 2008 at 1:51 am
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
Oktober 20th, 2008 at 9:23 am
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
Oktober 21st, 2008 at 2:10 pm
this is the best guide ever.
Oktober 23rd, 2008 at 1:19 am
Great guide!!! i was searching for 2 days and didnt find anything like this! great work, thanks!
Oktober 29th, 2008 at 1:47 pm
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.
Oktober 30th, 2008 at 5:01 pm
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
November 5th, 2008 at 4:31 pm
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
November 10th, 2008 at 9:56 am
Thanks for this Great Guide!!!
November 18th, 2008 at 8:14 pm
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.
November 20th, 2008 at 7:49 pm
You are the bomb! I can’t thank you enough for this great info.
November 27th, 2008 at 6:44 pm
You Rock!
November 30th, 2008 at 1:44 pm
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.
Dezember 2nd, 2008 at 12:51 pm
Excellent, just what i have been searching the net for. Thank you!
Dezember 15th, 2008 at 9:44 pm
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?
Dezember 15th, 2008 at 10:03 pm
ok. it works. thats the 553 … thank you
Januar 7th, 2009 at 10:55 pm
Ahoi,
sehr gute Anleitung. Vielen Dank dafür, es hat direkt funktioniert.
Grüße
Stefan
Januar 8th, 2009 at 12:16 pm
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.
Januar 11th, 2009 at 11:00 pm
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..
Januar 12th, 2009 at 12:44 pm
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…”
Januar 13th, 2009 at 9:27 am
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
Januar 13th, 2009 at 9:36 am
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
Januar 16th, 2009 at 4:38 am
555 5.5.2 SYntax error. 30sm2821767yxk.57
failed
taht is the error i get
Januar 22nd, 2009 at 10:06 pm
Hi Thanks. Its working.. Really Great
Januar 28th, 2009 at 3:27 am
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
Februar 7th, 2009 at 5:07 pm
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!
Februar 18th, 2009 at 6:09 am
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…
Februar 18th, 2009 at 7:30 am
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…
Februar 19th, 2009 at 8:33 pm
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 !
Februar 24th, 2009 at 10:33 pm
Awesome, helped enormously!! Thanks for posting it!!
Februar 27th, 2009 at 2:52 am
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!
Februar 27th, 2009 at 10:54 pm
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..
Februar 27th, 2009 at 11:47 pm
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?
März 1st, 2009 at 8:32 pm
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.
März 1st, 2009 at 9:21 pm
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!
März 2nd, 2009 at 7:13 pm
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
März 27th, 2009 at 11:17 am
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
März 31st, 2009 at 11:36 am
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.
April 1st, 2009 at 8:44 pm
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!
April 2nd, 2009 at 2:38 pm
Thanks a lot for this tutorial. I spent half a day to solve this problem… Many thanks!
April 7th, 2009 at 3:40 am
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.
April 7th, 2009 at 3:42 am
But how to send mail through your own SMTP, not relay?
April 9th, 2009 at 9:16 pm
Thakss aton man..gr8888 Article
April 12th, 2009 at 11:16 pm
Fantastic. Your post has saved me hours and hours of time. The setup worked immediately. I would have never figured this out myself.
April 15th, 2009 at 11:59 am
Thnx!
April 24th, 2009 at 6:01 am
Excellent tutorial! Worked like a charm! Thank you!
April 26th, 2009 at 1:27 am
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”;
April 26th, 2009 at 1:34 am
The blog filtered: In my case the header contained tags (like greater or smaller than) causing a syntax error when being processed by gmail.
April 26th, 2009 at 4:47 pm
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
April 28th, 2009 at 5:30 pm
Many thanks for putting the time and effort in to make this tutorial and help others – this worked perfectly for me.
April 30th, 2009 at 7:57 pm
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!
Mai 1st, 2009 at 10:19 am
[...] 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 [...]
Mai 11th, 2009 at 1:10 am
555.5.5.2 Syntax error
mails are sent by drupal, headers should be ok.
Mai 11th, 2009 at 3:34 am
[...] http://www.zoe.vc/2008/mercury-mail-transport-system-fur-externe-mail-konfigurieren/?lan=english [...]
Mai 12th, 2009 at 11:19 am
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.
Mai 15th, 2009 at 10:32 am
Thank you so much…
Mai 30th, 2009 at 1:19 am
Great tutorial! thanks!!
Juni 1st, 2009 at 7:33 am
Thanks for valuable information and better tips about using the xampp and developing the php application.
Juni 1st, 2009 at 11:21 pm
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.
Juni 2nd, 2009 at 3:31 am
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
Juni 2nd, 2009 at 4:12 am
Created a test mail using php script and it works!
Thanks again
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.
Juni 15th, 2009 at 1:24 am
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
Juni 16th, 2009 at 9:17 am
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
Juni 21st, 2009 at 6:39 pm
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.
Juni 26th, 2009 at 5:44 am
[...] here’s the fix to the problem. [...]
Juli 15th, 2009 at 6:20 pm
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.
Juli 21st, 2009 at 12:45 pm
Vielen Dank, ich habe wochenlang selbst experimentiert.
Bis ich endlich diese Anleitung gefunden habe, und alles sofort geklappt hat.
Besten Dank….
Juli 23rd, 2009 at 10:20 am
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
August 5th, 2009 at 7:19 am
best ultimate …….!!!
thank u very much…..
great job man…
August 7th, 2009 at 10:16 am
thx
u are the best
August 18th, 2009 at 1:59 am
sorry does’nt work at all
August 23rd, 2009 at 3:45 pm
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.
August 25th, 2009 at 9:23 pm
very useful info
August 26th, 2009 at 4:15 pm
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
August 28th, 2009 at 1:44 pm
Hey David,
thanks for the tipp. This site seems to embed all contents kind of unfair. Let’s see what I can do.
September 6th, 2009 at 6:41 pm
gut gemacht! hat mir eine menge zeit gespart!
Merci
September 23rd, 2009 at 3:12 pm
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
Oktober 27th, 2009 at 11:53 am
Sehr, sehr, sehr hilfreiche Anleitung! Vielen Dank!
November 10th, 2009 at 2:43 am
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…
November 10th, 2009 at 3:22 am
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?
November 10th, 2009 at 6:50 am
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.
November 30th, 2009 at 8:34 am
Thanks for ur useful info:)
Dezember 26th, 2009 at 10:57 pm
DAMN!!!!!!!! Doesnt work for me :@
Dezember 30th, 2009 at 11:35 pm
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
Januar 11th, 2010 at 9:30 am
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?
Januar 11th, 2010 at 10:41 am
über welchen SMTP-Provider schickst du denn?
Januar 11th, 2010 at 10:59 am
also der fehler hat sich erledigt, jezz hab ich aber nen neuen xD Error FF servicing queue job
Januar 12th, 2010 at 9:44 am
Da kann sich Mercury nicht zum SMTP verbinden. Am besten mal Session Logging anschalten und schauen, was es sagt.
Januar 15th, 2010 at 5:20 pm
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
Februar 4th, 2010 at 1:19 am
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.
Februar 5th, 2010 at 12:26 am
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?
Februar 5th, 2010 at 7:37 am
Hey Kamikaze, I’m Alex, not David
If your mercury is offline, than it somehow can’t obtain an internet connection.
Februar 5th, 2010 at 12:43 pm
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
Februar 7th, 2010 at 5:40 pm
thanks bro, you have save me many hour
Februar 10th, 2010 at 11:59 pm
Hallo Alex
Das Tutorial ist super, ganz herzlichen Dank!
Februar 11th, 2010 at 3:47 pm
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?
Februar 17th, 2010 at 7:46 am
I was looking for this kind of tutorial for over an hour on Google – just what I needed! Thanks so much!!
Februar 17th, 2010 at 11:08 am
Great job! it really worked. i sent using my gmail to yahoo and it got delivered right at the inbox.
Februar 22nd, 2010 at 5:46 pm
Hello Alex,
It’s really an awesome tutorial!! Good job!! Thank you so so so much!!
Februar 23rd, 2010 at 3:46 am
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.
März 1st, 2010 at 4:45 pm
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.
März 5th, 2010 at 7:44 am
thanx man… great tutorial… I tried it for long period and finally did with ur support. thanx dude..
April 5th, 2010 at 8:05 pm
Thank you very very much!
Ähm… – warum sind hier alle Kommentare auf Englisch, wenn der eigentliche Post auf Deutsch ist???
Gruß,
pcworld
April 7th, 2010 at 5:59 pm
Na der Blogeintrag ist zweisprachig
April 8th, 2010 at 5:00 pm
Just a quick note to say thanks. Saved me hours by following your instructions, worked without any problems.
Mai 11th, 2010 at 8:06 pm
I’m trying to use MS-Outlook on my laptop to connect to my MM on my server. Both are located in my home.
MercuryC is giving me the following error, but I have no idea what it means: “Error FF servicing queue job.”
All I do know is that it’s not actually sending the emails, or I’m just not able to retrieve them.
So far it seems that every tutorial I’ve seen acts as if you are using your mail client on the same computer as the MM. I have a URL for my personal webserver that I also use for my mail server, so I’d rather use that instead of localhost.
Any Ideas?
Mai 13th, 2010 at 10:52 am
@Juice
Mercury seems not to be able to connect to the SMTP. Try this: http://objectmix.com/pegasus/203366-tcp-ip-error-mercurye.html
Juni 24th, 2010 at 1:24 am
I have followed what you have said to do but I have gotten stuck on step 7 part 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. I get free hosting from 000.webhost so do I need to set up an email service with them to finish step 7. They offer email service. The main reason I am setting up mercury is to be able to test my webpages with php. I thought I could just send the emails to my gmail account or should install thunderbird or something like that. Thank you for any help and I think this is a great tutorial.
Juli 14th, 2010 at 9:46 pm
I have an problem with mercury when i send an email appears the message that i eas sucessefully delivered but it never reaches the destination. What can i do. sorry for my english
Regards;
Alves
Juli 30th, 2010 at 10:29 pm
Hallo,
dein Guide ist super und wollte dazu sagen wenn jemand seine mails von Mercury durch z.B. Outlook auf dem selben Rechner abrufen will einfach einen Alias anlegen unter
“Manage local users/ADD”
Username: mailname
Personal Name: mailname
Passwort: ******
danach vorgehen wie unter Punkt 7:
“Smart host name” = mail.localhost
“Login username” = mailname
“Password” = ******
in eurem PHP Script mit der Funktion “mail();”
sollte immer als Empfänger Mail stehen: “mailname@localhost”
jetz nur noch die Mail in Outlook einrichten:
E-Mail: mailname@localhost
POP3: 127.0.0.1
SMTP: 127.0.0.1
Benutzername: mailname
Passwort: ******
fertig.
Juli 31st, 2010 at 7:09 am
Danke – super Ergänzung!
August 10th, 2010 at 5:47 am
In Mercury SMTP client (relay version) :
“failed”
“Error FF servicing queue job.”
Why???
August 10th, 2010 at 4:32 pm
Maybe wrong credentials?