# Sending mail from PHP mail() all emails bounce back

**URL:** <https://forum.virtualmin.com/t/sending-mail-from-php-mail-all-emails-bounce-back/58735>\
**Category:** Help! (Home for newbies)\
**Created:** [July 22, 2018, 9:36am UTC](https://forum.virtualmin.com/t/sending-mail-from-php-mail-all-emails-bounce-back/58735 "2018-07-22T09:36:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anthonyinit2012](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/anthonyinit2012/32/674_2.png) [@anthonyinit2012](https://forum.virtualmin.com/u/anthonyinit2012)\
**Post date:** [July 22, 2018, 9:36am UTC](https://forum.virtualmin.com/t/sending-mail-from-php-mail-all-emails-bounce-back/58735/1 "2018-07-22T09:36:52Z")

</div>

Hello all,

In my website script i’m using PHP mail() to send emails but i’m hosting my email server outside virtualmin (domain registar free email service)

Whenever i use my website contact form and try to send an email “You have successfully submitted your Contact US!” but non of the emails get to my inbox (free mail account at domain registarr)

i really don’t know what is going on and how to get it fixed. any help would be great

My php.ini  
; For Unix only. You may supply arguments as well (default: “sendmail -t -i”).  
; [http://php.net/sendmail-path](http://php.net/sendmail-path)  
sendmail\_path = /usr/sbin/sendmail -t  
sendmail\_from = [me@example.com](mailto:me@example.com)

Thank you

---

<div class="post-metadata">

**Author:** ![sodcore](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@sodcore](https://forum.virtualmin.com/u/sodcore)\
**Post date:** [July 31, 2018, 7:52am UTC](https://forum.virtualmin.com/t/sending-mail-from-php-mail-all-emails-bounce-back/58735/2 "2018-07-31T07:52:54Z")

</div>

I know that you need to start be setting up postfix on the server where the php is being called to send an email.  
I am having trouble setting up postfix myself though.  
Thanks,  
Donald

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [April 30, 2020, 5:38am UTC](https://forum.virtualmin.com/t/sending-mail-from-php-mail-all-emails-bounce-back/58735/3 "2020-04-30T05:38:18Z")

</div>

Closed on April 30, 2020, 5:38am UTC


