email sent via dma is received in plain text without attachments

Hi all, I'm hosting webERP, a PHP business web app, on FreeBSD 14.2 using PHP 8.2. webERP uses phpMail to send HTML-format emails with PDF attachments. The server uses dma to send email to the SMTP2GO smarthost for delivery. The trouble is that received email is text format instead of HTML and missing the expected PDF attachment.

Any idea what could be causing this or what to do about it?

Another developer on the webERP project is using a Linux shared hosting service and any sent emails are received in HTML format with expected PDF attachments. This seems to show webERP is doing the right thing although I expect there are still lots of differences in our environments, and things work on a Linux server in spite of issues while FreeBSD may be more pedantic about correctness.

Cheers,
Dale
 
Use the dma defer option to check the email generated before it leaves your system.

You might also try adding the compatibility option for sendmail.
 
Compare the mail messages of these two commands:
$ uuencode filename.pdf | mail -s Test you@yourdomain.com
$ echo "Message body text" | mutt -s Test -a filename.pdf -- you@yourdomain.com
The first one won't have the necessary MIME header, the second one does. I suppose it's best to code the headers yourself with PHP.
 
Back
Top