• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 165
  • Last Modified:

Urgent Help needed with PHP mail function

Hello, Experts.

I recently bought a linux based dedicated server for my project and I am experiencing very wierd problem with PHP mail function.

Using the PHP mail() function, I can only send mails to someone@mydomain.com successfully.  When I tried to send mails outside mydomain.com address, nothing happens.
Current mail setting in the php.ini is (which is located in \etc\php.ini folder).  Should I change something else in my domain directory or something else?

Thanks for your help.

[mail function]
; For Win32 only.
SMTP = localhost

; 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
1 Solution
I don't know how to help you fix php's built-in mail function.  I used to mess with it and it always gave me headaches.

I'd suggest trying PHPMailer.  Its very easy to setup and integrate into php and it works much better IMO.


Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now