I am using mimemail in a custom module and am having some issues. The return from mimemail() is showing (substitutions to protect the innocent :P ):
address: myemail@mydomain.com
subject: my test subject
body: my test body
sender: "My Name" <myotheremail@mydomain.com>
headers(array) - Content-Type: text/plain; charset=utf-8
result: 1So that looks just fine, but the email I am getting is:
Delivered-To: myemail@mydomain.com
Received: by 10.180.100.36 with SMTP id ev4cs108671wib;
Mon, 30 Jan 2012 07:30:24 -0800 (PST)
Received: by 10.229.111.158 with SMTP id s30mr6956950qcp.13.1327937423497;
Mon, 30 Jan 2012 07:30:23 -0800 (PST)
Return-Path: <www-data@mydomain.com>
Received: from mydomain.com (ec2-107-22-234-200.compute-1.amazonaws.com. [107.22.234.200])
by mx.google.com with ESMTP id l5si13993446qap.55.2012.01.30.07.30.23;
Mon, 30 Jan 2012 07:30:23 -0800 (PST)
Received-SPF: neutral (google.com: 107.22.234.200 is neither permitted nor denied by best guess record for domain of www-data@mydomain.com) client-ip=107.22.234.200;
Authentication-Results: mx.google.com; spf=neutral (google.com: 107.22.234.200 is neither permitted nor denied by best guess record for domain of www-data@mydomain.com) smtp.mail=www-data@mydomain.com
Received: by mydomain.com (Postfix, from userid 33)
id 16A5914820; Mon, 30 Jan 2012 15:30:23 +0000 (UTC)
To: myemail@mydomain.com
Subject: my test subject
Content-Type: text/plain; charset=utf-8
Message-Id: <20120130153023.16A5914820@mydomain.com>
Date: Mon, 30 Jan 2012 15:30:23 +0000 (UTC)
From: www-data@mydomain.com (www-data)
my test body
As you can see the "from" is not the sender I specified (nor the one returned to be from mimemail() ) but www-data.
I am not using a smtp module or anything, just sending with postfix from my server.
Comments
Comment #1
that0n3guy commentedI noticed that the "from" was never being added to the header in mimemail_headers. So I added:
after
Around near line 61 on mimemail.inc. Sorry no patch yet.
Comment #2
mrhanlon commentedI am seeing this as well.
edit: The fix in #1 worked for me.
Comment #3
andyf commentedFYI this is fixed in dev (a little bit more than fix #1).