Topic: iRedmail API
==== Required information ====
- iRedMail version: 0.8.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Linux/BSD distribution name and version: Debian/wheezy
- Related log if you're reporting an issue:
====
Hello Zhang,
Does iRedmail provide any API, so that I can call it for sending an email from a PHP webpage ?
Currently I am using a phpmailer (http://sourceforge.net/projects/phpmailer/) that comes with the Simfatic Registration Form (https://github.com/simfatic/RegistrationForm).
It is successfully sending emails. But the problem is that the emails are going to the spam folder. The reasons may be:
1. phpmailer sends out emails without authenticating with the mail server.
2. The headers are not correct.
I have checked the header of the email arrived in the Spam folder. It doesn't have spf and dkim "pass". So I just thought of some iRedmail API that I can call instead of calling the phpmailer's API. Please suggest.
Header Follows
=========================
Delivered-To: myemailid@gmail.com
Received: by 10.182.48.42 with SMTP id i10csp227958obn;
Wed, 30 Oct 2013 05:39:04 -0700 (PDT)
X-Received: by 10.68.129.40 with SMTP id nt8mr4974931pbb.108.1383136743690;
Wed, 30 Oct 2013 05:39:03 -0700 (PDT)
Return-Path: <www-data@server.mydomain.com>
Received: from server.mydomain.com ([100.101.102.103])
by mx.google.com with ESMTP id hb3si1822530pac.152.2013.10.30.05.39.03
for <myemailid@gmail.com>;
Wed, 30 Oct 2013 05:39:03 -0700 (PDT)
Received-SPF: neutral (google.com: 100.101.102.103 is neither permitted nor denied by best guess record for domain of www-data@server.mydomain.com) client-ip=100.101.102.103;
Authentication-Results: mx.google.com;
spf=neutral (google.com: 100.101.102.103 is neither permitted nor denied by best guess record for domain of www-data@server.mydomain.com) smtp.mail=www-data@server.mydomain.com
Received: from localhost (server.mydomain.com [127.0.0.1])
by server.mydomain.com (Postfix) with ESMTP id 6D61E638EC
for <myemailid@gmail.com>; Wed, 30 Oct 2013 12:39:02 +0000 (UTC)
X-Virus-Scanned: Debian amavisd-new at d1stkfactory
Received: from server.mydomain.com ([127.0.0.1])
by localhost (server.mydomain.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id EcJ9IxOki5_m for <myemailid@gmail.com>;
Wed, 30 Oct 2013 12:38:35 +0000 (UTC)
Received: by server.mydomain.com (Postfix, from userid 33)
id 31B10638ED; Wed, 30 Oct 2013 12:38:35 +0000 (UTC)
To: Aniyan Rajan <myemailid@gmail.com>
Subject: Your registration with mydomain.com
X-PHP-Originating-Script: 0:class.phpmailer.php
Date: Wed, 30 Oct 2013 12:38:35 +0000
From: My Domain <postmaster@mydomain.com>
Message-ID: <764edf7a471f02245c9944f5fe1a6d1e@www.mydomain.com>
X-Priority: 3
X-Mailer: PHPMailer (phpmailer.sourceforge.net) [version 2.0.4]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="utf-8"
Hello Aniyan Rajan
-----Email Body----
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.