Re: email sent via dma is received in plain text without attachments

From: Dale Scott <dale_at_dalescott.net>
Date: Fri, 22 Aug 2025 18:26:04 UTC
On 2025-08-22 09:48, John Levine wrote:

> According to Dale Scott <dale@dalescott.net>:
> 
>> -=-=-=-=-=-
>> 
>> 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?
> 
> DMA does not do anything clever to the mail it handles.  If you're not
> getting the HTML and attachments, that's because the PHP script isn't
> adding them.  I suppose it's theoretically possible that SMTP2GO is
> stripping them but that seems rather unlikely.
> 

Thanks for your help John.

> When you say phpMail, do you mean the PHPMailer library, the built in
> PHP mail() function, or something else?

webERP uses PHPMailer which in the absence of a config flat specifiying 
an SMTP server (aka smarthost), the php mail() function will be used, 
passing the mail to the local MTA, which in my case is dma. The other 
developer does not know the details of what is hosting services provider 
is doing, only that mail is delivered and he is not specifying an SMTP 
server in webERP.

Since the other developer can receive email with attachments, I think I 
can assume webERP is correctly generating the mail. It seems possible 
dma is removing the multi-part content due to some error that is ignored 
on Linux.

My thinking is that I need to:

Check dma log (if one exists)
Check SMTP2GO logs
Run dma so that it generates logging (if possible)

Cheers,
Dale

Fyi, here is "show original" for a recent email, which should have been 
in HTML and should have had an attached PDF. It seems to my naieve eye 
that there is no HTML or attachment, and since this works for the other 
developer, I should be able to assume webERP is correctly generating the 
mail. It seems possible dma is removing the multi-part content due to 
some error that is ignored on Linux.


Return-Path: 
<bt.o38eka1stjodoh3=5cx6oza1obd2=xzxv4mh3s8u50q@em921279.dalescott.net>
Received: from mi301-ssvc.dcs.int.inet (LHLO mi301.dcs.int.inet)
  (10.0.153.171) by cds323.dcs.int.inet with LMTP; Thu, 21 Aug 2025 
15:37:51
  -0600 (MDT)
Received: from omta022.cacentral1.a.cloudfilter.net ([10.0.143.222])
	by cmsmtp with ESMTPS
	id pCPVuQdHpRSTopCyluLTYn; Thu, 21 Aug 2025 15:37:51 -0600
Received: from shw-ibgw-4001a.ext.cloudfilter.net ([10.228.9.174])
	by cmsmtp with ESMTPS
	id pCL1uLQwH5MqypCyluSpen; Thu, 21 Aug 2025 21:37:51 +0000
Received: from a2i607.smtp2go.com ([103.47.206.95])
	by cmsmtp with ESMTPS
	id pCyjuGP729CuJpCykuFN6t; Thu, 21 Aug 2025 21:37:50 +0000
X-SHW-ORIG-RCPT: swiftconstruction@shaw.ca
Authentication-Results: shw-ibgw-4001a.ext.cloudfilter.net;
	dkim=pass header.d=smtpservice.net header.b=gVWEm7KB;
	dkim=pass header.d=dalescott.net header.i=@dalescott.net 
header.b=NqF8cFQg;
	dmarc=permerror (record unparsable: required version tag missing from 
record)
  header.from=dalescott.net
X-Authority-Analysis: v=2.4 cv=D6vkKeRj c=1 sm=1 tr=0 ts=68a791ae b=1
  cx=a_idp_d a=4bE9P08XUUryYeSYPjuXOQ==:117 a=4bE9P08XUUryYeSYPjuXOQ==:17
  a=_IOwNaMQN_sA:10 a=2OwXVqhp2XgA:10 a=KVNK1R2Qs0gA:10 a=rR46ASE-1r4A:10
  a=BsLg0OVx7u-3DZiCuggA:9 a=uDXMMbqNXFhfq9i5nQI5:22
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=smtpservice.net; s=mjqv30.a1-4.dyn; x=1755813170; h=Feedback-ID:
	X-Smtpcorp-Track:Date:From:Message-Id:Subject:To:Reply-To:Sender:
	List-Unsubscribe:List-Unsubscribe-Post;
	bh=ioRfrMyoatc4o+Sb21K2gPfo4SyJd90L3jWDzykrIbo=; 
b=gVWEm7KBulH72+0PPrR2NGCXBz
	FSujQdXDoJSGrlmXfWkFq5hNsQZUNc45HLySt9LCD/8CV69EbcH/ELr7IsDtgSolFv4kn1LEzouLZ
	0NvfNOdp3l8Mq83PIcgNj1n2oobSaeYOG1fyQNWr8Jmbwq9fw8j+hAnFYkK044Govg16PaYKOeBbz
	TzD8Oxv/9glbkYG6AICYOzwT7bJbCj1l6K6KFBZbz3tw8SIQ3KVU3OC7g5o7UKHmpRb+kXncSFb/Q
	7R/ww7HUQWA4lqiOafi8Mkz6iDsClchwjjEqPbqNoO10W6bcQjMuFgFCssnZl5kPj8VQyA83tnFih
	XnQdYhOA==;
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dalescott.net;
  i=@dalescott.net; q=dns/txt; s=s921279; t=1755812270; h=from : subject
  : to : message-id : date;
  bh=ioRfrMyoatc4o+Sb21K2gPfo4SyJd90L3jWDzykrIbo=;
  
b=NqF8cFQgKNNqLKQxCehNa6vHtZ8MeZg9G5ozpXHyFWvF+hJPP/U5BsLiR1zgVLTMx+Bi3Z
  
fxsm07WtlPB+aUJR/qwAkkZrgxYLsIPr4jIxSzwjpHlKKsiUyHH7NSEs8q1zr1Wis5G6SDDw
  
F7wZl2KE9VUXa61kltPITa39IYSjqWQy2RhDtST+/B/NlfA4K4b49vZqz2d6/xlCiHgNIbrH
  
tSRV6uXKWOm66go6N09VEQRON2ZmeODQEGpKR8TBIZXlbLnjfBFYW6fP7YQ8OENPVVkRJtUV
  55TCQs1L4SMPAxlQ7JBauxSgZiMYCasicvITOKXP18qJPnxW0ntVsF2Q==
Received: from [10.45.56.87] (helo=SmtpCorp)
  by smtpcorp.com with esmtpsa 
(TLS1.2:ECDHE_RSA_SECP256R1__AES_256_GCM:256)
  (Exim 4.94.2-S2G) (envelope-from <maestro@dalescott.net>)
  id 1upCyj-ED51Eh-EB
  for swiftconstruction@shaw.ca; Thu, 21 Aug 2025 21:37:49 +0000
Received: from [10.105.245.141] (helo=dalescott.net)
  by smtpcorp.com with esmtpsa
  (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
  (Exim 4.98.1-S2G) (envelope-from <maestro@dalescott.net>)
  id 1upCyi-FnQW0hQ14Ef-eFxf for swiftconstruction@shaw.ca;
  Thu, 21 Aug 2025 21:37:48 +0000
Received: from www (uid 80) (envelope-from maestro@dalescott.net) id 
21aeba
  by dalescott.net (DragonFly Mail Agent v0.13+ on whizzer);
  Thu, 21 Aug 2025 15:37:47 -0600
To: swiftconstruction@shaw.ca
Subject: weberp_scc_ReOrderLevel_2025-08-21.pdf
Message-Id: <E1upCyi-FnQW0hQ14Ef-eFxf@message-id.smtpcorp.com>
 From: maestro@dalescott.net
Date: Thu, 21 Aug 2025 21:37:48 +0000
X-Smtpcorp-Track: OGp4gWmWlPBf.lUvxSWY8kQHG.75HSzgCph0-
Feedback-ID: 921279m:921279a_T4Gmc:921279sBB8HigUNR
X-Report-Abuse: Please forward a copy of this message, including all 
headers,
  to <abuse-report@smtp2go.com>
X-CMAE-Envelope: 
MS4xfKYZcwCI0x7lmGTuKISREVKTLPjmxbxeRzPmTTvOYP+e4Hh52x2rljtIRTrWmuMhTO6TYxs5Hj+6YvWPedkkrmvWe0qxrseuRUA0oERah9i1gJXmSFgS
  
krT6IAgvJGF+Zn2FQr8n3b06k+vq9zo13osz8MSyWmxuEgd7qqJVIarzjzU9vTG9QooEYq50VPK7SfHa3foLIqsuZigo3t67oGlMn4brdgY1qxkHChGTbtrb
  hfVKF++X1BVrOhOZdBk7oJbi04v4yhxOg32QAqBNMh4=