Mercury wont load/Can't send mails using PHP!!!!

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Mercury wont load/Can't send mails using PHP!!!!

Postby bheart » 13. July 2010 00:15

Hi there.

I'm having problems with Mercury in XAMPP.

When i start Mercury from XAMPP control panel, it starts correctly but whenever i press Admin the program starts up in the process bar but whenever i click it in the process bar it dissapears.

But in XAMPP it says that it is still running.

But still even thought it is running whenever i use the mail(); function in PHP it gives me this error: "Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 5200, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\MafiaSoul\index.php on line 2512"

I have never used Mercury so go easy on me.
Last edited by bheart on 13. July 2010 01:29, edited 1 time in total.
bheart
 
Posts: 4
Joined: 13. July 2010 00:04

Re: Mercury wont load

Postby JonB » 13. July 2010 00:34

What is it you want to do?

Do you want to sendmail from a PHP application, either your own, WordPress, Drupal or Joomla?? - use 'sendmail.exe'. Its a stand-in for the *nix sendmail. It needs to be configured first.

There's the info for it in this thread:

viewtopic.php?f=16&t=41163&p=162625&hilit=sendmail#p162625

If you want a fullly functional SMTP and POP mailserver for your domain, then what you want is Mercury. I'm not expoert with Mercury, I use a different Windows mailserver - hMail.

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Mercury wont load

Postby bheart » 13. July 2010 00:44

JonB wrote:What is it you want to do?

Do you want to sendmail from a PHP application, either your own, WordPress, Drupal or Joomla?? - use 'sendmail.exe'. Its a stand-in for the *nix sendmail. It needs to be configured first.

There's the info for it in this thread:

viewtopic.php?f=16&t=41163&p=162625&hilit=sendmail#p162625

If you want a fullly functional SMTP and POP mailserver for your domain, then what you want is Mercury. I'm not expoert with Mercury, I use a different Windows mailserver - hMail.

Good Luck
8)

That isn't really what i am looking for, what i want to do is to be able to send mails using the mail(); function in PHP, and since mercury is already in XAMPP i thought i would ask here before downloading any 3rd party software to do this in. I have a webserver going where it all works with no configuration, but now i want the same codes to work on my own computer (localhost), which means that i need some sort of a mail server.
bheart
 
Posts: 4
Joined: 13. July 2010 00:04

Re: Mercury wont load

Postby bheart » 13. July 2010 01:05

And by the way i tried doing everything in your little tutorial, it didn't work.
bheart
 
Posts: 4
Joined: 13. July 2010 00:04

Re: Mercury wont load/Can't send mails using PHP!!!!

Postby JonB » 13. July 2010 02:48

uhhh - did you look in the sendmail folder in XAMPP?

That's what the XAMPP builders put it there for, trust me. to 'sendmail' from applications in XAMPP. I have it busily sending mail from forums and blogs on two servers. And, the instructions carefully followed, it works. It may not work for you - but that would be due to the configuration that was set by you.

You could just search this forum for 'sendmail' and you will find some get it to work, some don't. So it isn't a function of the program (its all the same code), rather the user's insight and patience. If you would like to test it, PM me and I will tell you a site you can verify it on.

It took me three tries of re-reading the instructions (contained in the sendmail.ini file) and some help from Nobbie, but it works,=. If you have an ISP mail account my example works, there are examples for gmail and other account types also included.

If you choose not to listen to me, the good news is you will learn all about mailservers now. :lol:

And you are welcome to think what you want and to do what you want, its a free world in many places.

Good Luck
:roll:
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Mercury wont load/Can't send mails using PHP!!!!

Postby bheart » 13. July 2010 14:13

JonB wrote:uhhh - did you look in the sendmail folder in XAMPP?

That's what the XAMPP builders put it there for, trust me. to 'sendmail' from applications in XAMPP. I have it busily sending mail from forums and blogs on two servers. And, the instructions carefully followed, it works. It may not work for you - but that would be due to the configuration that was set by you.

You could just search this forum for 'sendmail' and you will find some get it to work, some don't. So it isn't a function of the program (its all the same code), rather the user's insight and patience. If you would like to test it, PM me and I will tell you a site you can verify it on.

It took me three tries of re-reading the instructions (contained in the sendmail.ini file) and some help from Nobbie, but it works,=. If you have an ISP mail account my example works, there are examples for gmail and other account types also included.

If you choose not to listen to me, the good news is you will learn all about mailservers now. :lol:

And you are welcome to think what you want and to do what you want, its a free world in many places.

Good Luck
:roll:

Look, all i am trying to do is to use the mail(); function using PHP and i am new to the whole thing, this doesn't help me at all.

Isn't there a basic tutorial or something you can link me to?
bheart
 
Posts: 4
Joined: 13. July 2010 00:04

Re: Mercury wont load/Can't send mails using PHP!!!!

Postby JonB » 13. July 2010 15:46

Look --

That is exactly what I have done for you. Told you how to do the job.

A - you have to make changes to the php.ini [mail_function] section that match the delivery method - so you have to learn what that function does.

In those posts I gave the exact syntax to be used (in most cases)

sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"

B. - you will need an MTA (Mail Transfer Agent) that 'pushes' mail to a mail server -- that would be c:\xampp\xampp\sendmail.exe. [as I explained twice already in this thread - although you were hell bent on running Mercury and didn't want a third party solution, remember?]

and that MTA has to be configured to match your environment. And I gave a complete example of how make the changes to sendmail.ini with your ISP e-mail account. I didn't write any of this software, package it or prepare the non-existent documentation, I am sharing my experience.

I can't do a remote Vulcan Mind Meld and guess what your arrangements for e-mail are or why you chose to do them that way.

So you know, this is a volunteer effort I make here (as well as on two other Open Source projects), I have no formal connection with this project. If you want, I will do the work for you at my customary hourly rate. Should I Google for tutorials for you as well?

How do you think I learned all this stuff? Searching, reading and testing... You have to invest the effort to learn things, that is the only way they have value.

If you make the effort, you will find the results satisfying and rewarding -- because YOU did it.

Peace and Good Luck

8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Mercury wont load/Can't send mails using PHP!!!!

Postby whiterican » 18. July 2010 00:43

bheart wrote:
JonB wrote:uhhh - did you look in the sendmail folder in XAMPP?

That's what the XAMPP builders put it there for, trust me. to 'sendmail' from applications in XAMPP. I have it busily sending mail from forums and blogs on two servers. And, the instructions carefully followed, it works. It may not work for you - but that would be due to the configuration that was set by you.

You could just search this forum for 'sendmail' and you will find some get it to work, some don't. So it isn't a function of the program (its all the same code), rather the user's insight and patience. If you would like to test it, PM me and I will tell you a site you can verify it on.

It took me three tries of re-reading the instructions (contained in the sendmail.ini file) and some help from Nobbie, but it works,=. If you have an ISP mail account my example works, there are examples for gmail and other account types also included.

If you choose not to listen to me, the good news is you will learn all about mailservers now. :lol:

And you are welcome to think what you want and to do what you want, its a free world in many places.

Good Luck
:roll:

Look, all i am trying to do is to use the mail(); function using PHP and i am new to the whole thing, this doesn't help me at all.

Isn't there a basic tutorial or something you can link me to?



Given that I just started incorporating php logins/registrations/ to my websites (i'm learning)

I found that the problem can lie in 3 places...

1) What your php script points to... like [admin@host] or [auto-reply@host] etc. and what your php.ini has listed as your host.. eg.. [postmaster@localhost] or Admin@ example. com

2) what ports you have set up for your smtp server. they must match

3) whether or not you are trying to send mail through another outgoing server like gmail. (not necessary in most cases but if your isp blocks mail server traffic then one must consider it)

Using the php function requires that you match the username@host.... in your script and php.ini file. as well as Merc S.
the x-mailer won't connect send mail if it doesnot match. Always a good idea that your outgoing server require authentication though. Because you will have alot of people trying to route through your server otherwise...


In merc s

Make sure the ip you are connecting from 192.168.xxx.xxx is allowed to access the server.

Merc Core module


Local domains


Code: Select all
 Localhost                    localhost
          Localhost                    127.0.0.1
          xxx.com                      xxx.com
          xxx.com                      192.168.xxx.xxx
          xxx.com                      mail.xxx.com


Windows host file

Code: Select all
  127.0.0.1                 localhost
           192.168.xxx.xxx       xxx.com
           192.168.xxx.xxx       mail.xxx.com




php.ini
located at xampp/php/php.ini lines 1099-1108


[mail function]
; For Win32 only.
SMTP = xxx.com
smtp_port = 25 What ever port you are choosing to send mail from

; For Win32 only.
sendmail_from = admin@xxx.com who you have listed in your user directory in merc mail users. (postmaster in 1.73 is not a user.



xmailer function which is in your script

Your php script must contain the correct username@host.... example: Admin@host


SendMail need not be modified, unless you are configuring your server to use an external outgoing mail server like gmail or hotmail or yahoooooo.

Although I am still learning this I hope it helps....

Sincerely

White
whiterican
 
Posts: 32
Joined: 13. December 2009 02:19

Re: Mercury wont load/Can't send mails using PHP!!!!

Postby techq » 31. July 2010 03:14

thankx, i just solve my problem!
techq
 
Posts: 1
Joined: 30. July 2010 13:31

Re: Mercury wont load/Can't send mails using PHP!!!!

Postby jmoghari » 14. August 2010 01:42

techq wrote:thankx, i just solve my problem!


May I ask what you did to solve your problem? It may be the answer to help solve mine. Thanks.
jmoghari
 
Posts: 2
Joined: 13. August 2010 01:53

Re: Mercury wont load/Can't send mails using PHP!!!!

Postby JonB » 14. August 2010 16:09

by jmoghari » 13. August 2010 20:42

It may be the answer to help solve mine


There are a variety of issues in this topic. You will need to tell us specifically what your goal is and what the problem you are encountering.

Is is that you want to 'send mail' from PHP, or is it that you want to set up a mailsever?

The Mercury mailserver is NOT needed to sendmail from PHP, it is meant to be a full service mailserver for a domain.

8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Mercury wont load/Can't send mails using PHP!!!!

Postby salma66 » 08. September 2011 10:31

Yes there ia a variety of issues in this topic, and all of them proved to be useful for me,
so
thanks a million!!!! :wink:
salma66
 
Posts: 1
Joined: 08. September 2011 10:28


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 124 guests