Anyone have any experience configuring Mercury to send emails externally?
Results 1 to 12 of 12

Thread: Anyone have any experience configuring Mercury to send emails externally?

  1. #1
    Senior Member
    Join Date
    Mar 2009
    Location
    Canada
    Posts
    794

    Anyone have any experience configuring Mercury to send emails externally?

    Not sure if this is the correct section for this, but it didn't seem to fit elsewhere.

    So here's the deal.

    At work we recently rebuilt our internal server. It was long overdue and now it runs much better... for the most part. Apache, MySQL, PHP, etc. all run like they used to, and now we're running with the latest versions of whatever is packaged with XAMPP. The only problem is we cannot get the emails to work. I wasn't involved during the set up of the email portion before, but as time went on I slowly became the de facto "server admin" simply because I knew more than the others about configuring Apache, MySQL, PHP (I've set them up manually while others do it via XAMPP), user management, mapping drives, setting permissions, etc. So I essentially inherited the server. Also over this time period the main person who configured Mercury is no longer with the company... and never documented anything. One other person was kind of involved, but doesn't remember enough to be useful. He said he just found a video online that worked with Thunderbird and that was it.

    Him and I sat down and tried to get it configured, but have had no luck. He thinks he found the video that he used before, and we followed the steps, but no matter what we have tried emails just do not send. We have googled quite a bit and read a lot of walkthroughs and watched a lot of videos, but all the same result.

    The way it worked before is you would use the mail() function and then the recipient address would receive an email from our foo@ourcompanyname.com email account. I wish I knew what the previous settings were in Thunderbird or Mercury, but like I said, unfortunately I was not involved (otherwise I would have written this stuff down).

    Just to be clear there is no error from the mail() function of any kind. When I execute a call to mail() it returns true, so PHP itself is happy with whatever configuration there is, but since we all know just because the mail() function is happy, doesn't mean the email will actually be sent/received.

    I would have thought there would be an easy way to enter credentials for an email address including SMTP information, and Mercury just sends the email on its behalf. We have all the info for our email address plus the smtp.gmail.com SMTP info, so I would have thought this process would be simple, but I guess not.

    I've tried working with MercuryC SMTP and MercuryE SMTP (amongst others) to no avail.

    Does anyone have any experience with this, or a link to a walkthrough?

    Thanks for reading.
    Prison of Mirrors
    Declare variables, not war.

  2. #2
    High Energy Magic Dept. NogDog's Avatar
    Join Date
    Aug 2006
    Location
    Ankh-Morpork
    Posts
    13,816
    I probably don't know enough about the subject to know if this would be a viable solution, but PHPMailer comes with its own SMTP class (all native PHP) that you might be able to leverage if all else fails?
    Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be." ~ from Nation, by Terry Pratchett

    "But the main reason that any programmer learning any new language thinks the new language is SO much better than the old one is because he’s a better programmer now!" ~ http://www.oreillynet.com/ruby/blog/...ck_to_p_1.html


    eBookworm.us

  3. #3
    Senior Member
    Join Date
    Mar 2009
    Location
    Canada
    Posts
    794
    Quick addendum:

    I am able to send email from our server via Thunderbird through our foo@ourcompanyname.com email account. I just need to tell PHP/Mercury that when the mail() function is executed, to tell Mercury to send the email via that account.

    Quote Originally Posted by NogDog View Post
    I probably don't know enough about the subject to know if this would be a viable solution, but PHPMailer comes with its own SMTP class (all native PHP) that you might be able to leverage if all else fails?
    We'll be exploring all options if we cannot get this to work.
    Prison of Mirrors
    Declare variables, not war.

  4. #4
    Senior Member
    Join Date
    Oct 2005
    Location
    Chicago, IL
    Posts
    416
    I apologize if this incorrect but wouldn't you just need to change your PHP.ini?

    Code:
    [mail function]
    SMTP=your_mercury_ip (ie:smtp ip)
    smtp_port=25
    sendmail_from = me@example.com
    Bob Lob Law

  5. #5
    Senior Member
    Join Date
    Mar 2009
    Location
    Canada
    Posts
    794
    Quote Originally Posted by jeepin81 View Post
    I apologize if this incorrect but wouldn't you just need to change your PHP.ini?

    Code:
    [mail function]
    SMTP=your_mercury_ip (ie:smtp ip)
    smtp_port=25
    sendmail_from = me@example.com
    I've been pulled off it for now since I have some deadlines I have to meet, so I haven't had a chance to test this, but during my troubleshooting I did change the values of those items (I've since commented them out).

    This is what I currently have, which is pretty similar to what you suggested (though note the comment above the SMTP port):

    Code:
    [mail function]
    ; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
    ;SMTP = 192.168.1.150
    ;smtp_port = 25
    
    ; For Win32 only.
    ; http://php.net/sendmail-from
    ;sendmail_from = postmaster@localhost
    I guess I should change the 192.168.1.150 to 127.0.0.1 or localhost?
    Prison of Mirrors
    Declare variables, not war.

  6. #6
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    7,618
    Quote Originally Posted by Bonesnap View Post
    I guess I should change the 192.168.1.150 to 127.0.0.1 or localhost?
    Is there a server of the correct type answering the correct port at one of those addresses?

    Not sure if you can do this from CLI in Windows, but in 'Nix it'd be something like (for SMTP):

    Code:
    telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    220 freebsd-devel.ombe.com ESMTP Sendmail 8.14.5/8.14.4; Thu, 13 Feb 2014 11:12:21 -0600 (CST)
    Which tells me, at the very least, that the Sendmail SMTP server is indeed listening on "localhost", port 25.

    If you have Win7+, I think you can also do this from the CLI (I seem to be able to from Win7).
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

  7. #7
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,348
    Quote Originally Posted by Bonesnap View Post
    Code:
    [mail function]
    ; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
    ;SMTP = 192.168.1.150
    ;smtp_port = 25
    
    ; For Win32 only.
    ; http://php.net/sendmail-from
    ;sendmail_from = postmaster@localhost
    Er... is that exactly what you have? Because if you'll note the semicolons out front, that is equivalent to having:
    Code:
    [mail function]

  8. #8
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    7,618
    Quote Originally Posted by bradgrafelman View Post
    Er... is that exactly what you have? Because if you'll note the semicolons out front, that is equivalent to having:
    Code:
    [mail function]
    I don't think so ...

    Quote Originally Posted by Bonesnap View Post
    (I've since commented them out).
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

  9. #9
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,348
    Ah, missed that part. Disregard.

  10. #10
    Senior Member
    Join Date
    Mar 2009
    Location
    Canada
    Posts
    794
    Quote Originally Posted by dalecosp View Post
    Is there a server of the correct type answering the correct port at one of those addresses?

    Not sure if you can do this from CLI in Windows, but in 'Nix it'd be something like (for SMTP):

    Code:
    telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    220 freebsd-devel.ombe.com ESMTP Sendmail 8.14.5/8.14.4; Thu, 13 Feb 2014 11:12:21 -0600 (CST)
    Which tells me, at the very least, that the Sendmail SMTP server is indeed listening on "localhost", port 25.

    If you have Win7+, I think you can also do this from the CLI (I seem to be able to from Win7).
    Define correct type. Everything is on localhost, but I decided to try the 192.168.x address because I was getting desperate. I don't think practically it would make any difference, but who knows.

    And we are running Windows 7 Ultimate but the telnet command is not recognized. Is there any other way I can check on Windows if that's running correctly (like check a specific service or something)?

    Quote Originally Posted by bradgrafelman View Post
    Er... is that exactly what you have? Because if you'll note the semicolons out front, that is equivalent to having:
    Code:
    [mail function]
    Heh yeah I had them uncommented when I was testing it out, but since then I have them commented out. According to the php.ini file they're supposed to be *shrug*. Regardless of what I have done with those properties I have not had any difference in behaviour.

    Also, does anyone know what (if any) difference there is between Mercury and Sendmail? I've seen both come up when I've been googling, but don't know enough to differentiate them or if they're the same thing but people interchange terminology. Sometimes it seems it's part of Mercury but I haven't read anything that says that explicitly.
    Prison of Mirrors
    Declare variables, not war.

  11. #11
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    7,618
    Dang. Lost a *huge* post here. To summarize:

    SMTP = Simple Mail Transport Protocol. Port 25/465(secure). Common MTA (Mail Transport Agent) servers include Sendmail, Postfix, Exim, Exchange, and a host of others.

    POP3 = Post Office Protocol v3. Port 110/995(secure). Common POP servers include Qpopper, Dovecot, Courier, Cyrus, Exchange, and many more.

    IMAP = Internet Message Access Protocol. Port 143/993(secure). Many POP servers also do IMAP.

    Client programs are, technically, called MUA's (Mail User-Agents). Common MUA's include tons of web apps (Gmail, anyone?), Outlook, Windows Mail, Eudora, LotusNotes, mutt, elm, pine, /bin/mail ... :P Well, at any rate, there's about a thousand ways to read email.

    The chief difference between IMAP and POP is that in IMAP messages remain on the server by default. An IMAP client must always have access to the network in order to operate, whereas a POP3 system can connect, download the messages, and disconnect.

    As near as I can tell, Mercury is David Harris' SMTP implementation, designed to work closely with his MUA Pegasus. I don't know how much of his work might be based on Sendmail. Both Mercury and Sendmail would speak (E)SMTP, but they are not the same software.

    HTH,
    Last edited by dalecosp; 02-13-2014 at 03:55 PM.
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

  12. #12
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    7,618
    Incidentally, if you'd like to PM me the FQDN of your mail server, I could see if it's available from the central USA.
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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