Welcome to WebmasterWorld Guest from 35.172.195.49

Forum Moderators: phranque

Message Too Old, No Replies

Postfix sending mail using PHP mail() function not sending

php mail function with posfix

     
10:08 am on Jul 26, 2018 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:Oct 28, 2017
posts: 50
votes: 0


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"). ; [php.net...] sendmail_path = /usr/sbin/sendmail -t sendmail_from = me@example.com

Thank you
11:19 am on July 26, 2018 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


Hi anthonyinit 2017,

Those sendMail PHP scripts are sometimes touchy that the email address needs to be local.

Set up an alias email address at your website account that forwards to that free mail account at your domain registar. Then use that alias email address in the script.
11:37 am on July 26, 2018 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:Oct 28, 2017
posts: 50
votes: 0


@keyplyr
Thank you for ur reply. my main concern is to hide my original IP addess for safety that is why i'm going to use free gmail account address in my script. also my DNS configured with cloudflare.

so basically i want my website script contact form to use my gmail id but i don't want to use my VPS server for emails (if i do that i will have to add my MX record in cloudflare and from there anyone can find my real IP.

is there away to work this out? or should i 1st try your method by creating a alias?

thank you
11:43 am on July 26, 2018 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


Do some testing. Find what works :)

Because of Cloudflare's distributed server routing, you may also need to move the script to Cloudflare Workers [cloudflare.com]
12:26 pm on July 26, 2018 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:Oct 28, 2017
posts: 50
votes: 0


Yes i will try to do some testing and get back with the updates

thank you :)