Errors on checkout:

Type mail
Date Monday, February 3, 2020 - 16:01
User
Location .../commerce-paypal/checkout-approve/paypal_checkout/765
Referrer .../checkout/765/review
Message Error sending email (... with reply-to not set).
Severity Error

Is this due to a config issue or something missing in code?

Also I get another from Swiftmailer with more detail:

An additional error message also resulting from this seems to be from the Swiftmailer module:

Type swiftmailer
Date Monday, February 3, 2020 - 16:01
User ...
Location .../commerce-paypal/checkout-approve/paypal_checkout/765
Referrer .../checkout/765/review
Message An attempt to send an e-mail message failed, and the following error message was returned : Expected response code 250 but got code "554", with message "554 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 0.35250:CF050000, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:91360000, 1.36674:0E000000, 1.61250:00000000, 1.45378:96360000, 1.44866:3A010000, 16.55847:101B0000, 17.43559:0000000004020000000000000000000000000000, 20.52176:140F7E8A1300F01F00000000, 20.50032:140F7E8A8317F01F0A00C481, 0.35180:140F7E8A, 255.23226:0A000000, 255.27962:0A000000, 255.27962:0E000000, 255.31418:F2050000, 0.35250:0A008381, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:38000000, 1.36674:32000000, 1.61250:00000000, 1.45378:3D000000, 1.44866:01000000, 16.55847:A4000000, 17.43559:0000000030030000000000000F00000000000000, 20.52176:140F7E8A130010100B060000, 20.50032:140F7E8A8317000003000136, 0.35180:10060000, 255.23226:0A008981, 255.27962:0A000000, 255.27962:32000000, 255.17082:DC040000, 0.27745:4800D13D, 4.21921:DC040000, 255.27962:FA000000, 255.1494:0A002F3D, 0.38698:0F010480, 0.37692:08000001, 0.44092:00000000, 0.41232:1B000100, 0.60208:1B000100, 0.37136:1B000100, 0.34608:1B000100, 0.55056:31393A43, 0.42768:31324D42, 0.56112:3A356239, 0.52807:382D3039, 7.36354:01000000000001092D303837, 4.33016:DC040000, 7.40748:010000000000010B3BCBAB38, 7.57132:00000000000000000F010480, 1.63016:32000000, 4.39640:DC040000, 8.45434:D0B6AAE4DDD0AE4098431A23B2E390D70F010480, 5.10786:0000000031352E32302E323638362E3031393A434832505231324D42333637313A35623966366230382D303932362D346561642D393863352D3038373462636237353530340040100F010480, 7.51330:B6566545C2A8D7080F010480, 255.1750:0A00F136, 255.31418:5B060000, 0.22753:0A00157A, 255.21817:DC040000, 4.60547:DC040000, 0.21966:0A008A85, 4.30158:DC040000 [Hostname=CH2PR12MB3671.namprd12.prod.outlook.com] "

The e-mail carried the following headers:

Return-Path: <[site-email]>
Sender: [site-email]
Message-ID: <...>
Date: Mon, 03 Feb 2020 16:01:02 +0000
Subject: Order #765 confirmed
From: [from email]
Reply-To: [from email]
To: [customer-email]
Bcc: [from-mail]
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="_=_swift_v4_1580745662_e1ed826411f45bdf6ff4c04889dbb828_=_"
X-Mailer: Drupal
Severity Error

Comments

bsnodgrass created an issue. See original summary.

bsnodgrass’s picture

Issue summary: View changes
bojanz’s picture

Category: Bug report » Support request

It looks like your mail server is rejecting the email that Drupal is trying to send.

bsnodgrass’s picture

Updating issue with latest notes and investigations... hopefully this will help someone else.

Yes we understood this was due to mail server rejection. Really glad the expected and received error codes were provided, thanks for that! i.e.

Message An attempt to send an e-mail message failed, and the following error message was returned : Expected response code 250 but got code "554", with message "554 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message.

We are also having trouble with a number of issues of email placed in spam or not even delivered to some addresses, even core user/password, (which doesn't provide such feedback.)

We found the specific error code at https://postmaster.comcast.net/smtp-error-codes.php

554 - [PTR lookup failure] 

Comcast requires all sending mail server IP addresses have a valid PTR record set up. This error results when the lookup failed. 

NXDOMAIN response. One of the authoritative servers for the relevant section of the in-addr.arpa DNS tree is saying that there is no PTR record for the given IP address.

We have since added the necessary PTR record and are currently waiting for it to refresh. Hopefully this solves this problem.

bsnodgrass’s picture

@bojanz Why do you think the swiftmailer test did not result in the same message we saw here?

bojanz’s picture

The test sets different headers/data than Commerce. Something in the Commerce headers caused your mail server to be picky. You'd have to compare the two to find out what.

kerasai’s picture

Status: Active » Closed (works as designed)

After troubleshooting we found that this was failing SMTP authentication, as we were authenticating as one user and the store was configured to send as another user.

Our solution was to adjust the permissions (in our email provider) to allow our SMTP user to send as the store's user.