Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8605163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:45:30+00:00 2026-06-12T02:45:30+00:00

I noticed a couple other posts around that were similar to my problem but

  • 0

I noticed a couple other posts around that were similar to my problem but found that they weren’t specific to my scenario or I am just not understanding things very well.

My situation: I am trying to send mail from a LAMP server using the PHP mail() function. I want to relay the mail to another dedicated mail server.

Problem: It seems I am not able to send mail…sometimes. Sometimes it seems capable of sending mail to accounts outside of the domain but it fails to send any mail to accounts within the domain/network. I have seen logs often complaining about it not being able to authenticate to the domain controller…but it shouldn’t have to worry about that should it?

I guess the part I am confused about is does the PHP mail() function automatically create an SMTP message to the server? Or do I have to set the php.ini settings to look at the localhost and then configure sendmail/postfix to send the message to the mail server. Also, why would it bother to authenticate with the domain controller if I only specified that the LAMP server try to connect with the mail server?

Hopefully someone can help me get this sorted out. It’s been bothering me for a while now and haven’t been able to find a solution.
Thank you,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T02:45:31+00:00Added an answer on June 12, 2026 at 2:45 am

    does the PHP mail() function automatically create an SMTP message to
    the server? Or do I have to set the php.ini settings to look at the
    localhost and then configure sendmail/postfix to send the message to
    the mail server

    PHP’s mail() function doesn’t do that much by itself. On linux, it will typically connect to a local instance of sendmail or similar, using settings defined in php.ini. Check out this section from example php.ini:

    [mail function]
    ; For Win32 only.
    ; SMTP = localhost
    ; smtp_port = 25
    
    ; For Win32 only.
    ;sendmail_from = me@example.com
    
    ; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
    sendmail_path = /usr/sbin/sendmail -t -i
    

    For windows, SMTP server at configured port is used by mail(). For linux, defined sendmail path is used.

    Using other words, PHP mail() function on windows connects to a SMTP server, be it local or remote. PHP mail() on Linux cannot do the same. On Linux, the function will only use a local sendmail installation that you need to set up yourself to connect to a SMTP server. Alternative for that kind of configuration is to use PHPMailer, Swiftmailer, Zend_Mail or similar, that provide SMTP functionality by themselves.


    why would it bother to authenticate with the domain controller if I
    only specified that the LAMP server try to connect with the mail
    server?

    I’m far from being an expert on this, but as far as I’ve understood, you need to be authenticated user in your network to access outside resources which mailing would need. A domain controller gives out that kind of permissions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've noticed a couple of other posts on here of a similar nature, but
I have a problem with IE7, i just noticed couple days ago that my
I've noticed that there are a couple of similar questions and answers at SO
I've noticed a couple other questions about handling this, but all seem to suffer
I noticed that if you have a couple of radios together, you are required
I noticed that I can't combine --traditional options with the other one letter other
I noticed that there seems to be a couple of slightly different syntaxes for
I've noticed that GitHub launched a new Clone in Mac button a couple of
I went through couple of template matching tutorials and I had noticed that most
I have couple of iPhone apps that sends an email via code. I've noticed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.