Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Using Zoho mail, PHP mail() goes to spam.
Okay, I’m a very newbie to Linux servers.
I am running LAMP stack on my droplet. All the mail system is powered by Zoho mail (some kind like Google Apps).
I wrote a PHP web app, and the e-mail sent from mail() goes directly to spam in Gmail.
Here is the information obtained from Gmail when I send my Email from the PHP web app:
Delivered-To: email@example.com Received: by 10.202.168.206 with SMTP id r197csp2640062oie; Mon, 1 Feb 2016 01:03:13 -0800 (PST) X-Received: by 10.107.131.155 with SMTP id n27mr4882881ioi.132.1454317393436; Mon, 01 Feb 2016 01:03:13 -0800 (PST) Return-Path: <firstname.lastname@example.org> Received: from srakrn.com ([126.96.36.199]) by mx.google.com with ESMTPS id u4si13948179igr.88.2016.02.01.01.03.12 for <email@example.com> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Feb 2016 01:03:13 -0800 (PST) Received-SPF: neutral (google.com: 188.8.131.52 is neither permitted nor denied by best guess record for domain of firstname.lastname@example.org) client-ip=184.108.40.206; Authentication-Results: mx.google.com; spf=neutral (google.com: 220.127.116.11 is neither permitted nor denied by best guess record for domain of email@example.com) firstname.lastname@example.org Received: from srakrn.com (localhost [127.0.0.1]) by srakrn.com (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id u1193BBg002012 for <email@example.com>; Mon, 1 Feb 2016 04:03:11 -0500 Received: (from www-data@localhost) by srakrn.com (8.14.4/8.14.4/Submit) id u1193B54002011; Mon, 1 Feb 2016 04:03:11 -0500
The line “Received: from srakrn.com (localhost [127.0.0.1])” made me think I’m configuring something very, very wrong.
I’ve tried changing the host name to srakrn.com, and tried editing /etc/hosts to make sure the IP points to my domain. What can I do next?