I’m trying to send mails using PHP.
For some reason when I receive the mail it doesn’t contain a body on gmail (although it does contain the subject).
If I send the mail to my own mail on my own domain the mail has body content.
I use Zimbra mailserver on my own domain.
The message content is:
--PHP-alt-31f1966d3bca8227c696f4123ec98b34
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
message body
--PHP-alt-31f1966d3bca8227c696f4123ec98b34
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
<p>message body</p>
--PHP-alt-31f1966d3bca8227c696f4123ec98b34
The headers:
From: "Some user" <user@example.com>
Reply-To: "Some user" <user@example.com>
Content-Type: multipart/alternative; boundary="PHP-alt-31f1966d3bca8227c696f4123ec98b34"
The code:
$mail_send = @mail($to, $this->subject, $this->message, $this->headers);
Any idea what the reason could be for the missing body content?
The last delimiter needs to end with an additional –. That may solve it.