Author Topic: Mail module and php mail function  (Read 1954 times)

akhasis

  • Zen Apprentice
  • *
  • Posts: 39
  • Karma: +1/-0
    • View Profile
Mail module and php mail function
« on: September 06, 2013, 09:57:44 am »
Can anybody give me some advice on how to configure the "Mail" module in zentyal and php.ini so that I can use php mail() function to send emails?

I have been reading about it, but most of what I find implies third party mail servers.

Thanks in advance.

akhasis

  • Zen Apprentice
  • *
  • Posts: 39
  • Karma: +1/-0
    • View Profile
Re: Mail module and php mail function
« Reply #1 on: September 20, 2013, 09:03:35 am »
Ok, it seems that the module and the mail are actually working ok. The problem seems to be that I don't know how to tell Zentyal where to deliver the mail.

I have a domain, "mycompany.com". That domain is setup in Zentyal DNS to point to the Zentyal machine, so that when "mycompany.com" is typed in the browser, the webpage hosted in the Zentyal machine is displayed.

That domain is also used for emails, but they are managed by an external provider. Anytime a message is sent from outside Zentyal to akhasis@mycompany.com, the mail arrives to my external mail manager. The problem is when the message is originated inside Zentyal.

The e-mail is sent without problems, but it is delivered to the Zentyal machine, instead of the external mail provider. I have tried to set that provider's DNS in the Zentyal Mail Exchanger DNS for the domain, but the messages are still delivered to Zentyal.

How can I get messages to be sent to my e-mail provider?

christian

  • Guest
Re: Mail module and php mail function
« Reply #2 on: September 20, 2013, 09:27:38 am »
That's quite easy (from very eye level view): do not configure mail on Zentyal server.
In order to achieve what you are looking for, you don't need Zentyal mail service but only mail client (PHP-mail) to send mail to MTA to that mail is delivered to your ISP.

Zentyal mail concept is "one single block", all in one. If you set up Zentyal mail, then you will have MTA and MDA at the same time with no way you could split it and use one one feature or the other.

Give a try removing Zentyal mail module and configure php-mail to send mail outside, and it should work as expected  ;)