0

I have a simple form that lags for about 10 - 20 seconds and then succeeds.

I looked into the logs and found a timeout message from my SMTP server, however the email is still sent, and the settings are correct, so I am not sure what is causing this timeout.

90  15:34:07.749    < 9ms >
info    yii\mail\BaseMailer::send   Sending email "Subject Line" to "testemail@mydomain.com"

91  15:34:07.749    < 0ms >
info    yii\swiftmailer\Mailer::sendMessage Sending email "Subject Line" to "testemail@mydomain.com"

92  15:34:19.988    < 12s 238ms >
warning application Error sending email: Connection to ssl://smtp-relay.gmail.com:465 Timed Out

When I use the test button on the Craft Email settings page, it works in under a second.

When I look above the timeout, I can see what looks like 2 send attempts, but maybe this is normal. The subject line and email address were updated for privacy reasons, the real email address used was valid.

UPDATE

So to follow up on this, I have narrowed it down to the attachment that is sent with the notification email. It is a 3mb PDF file, and it throws this time out error. The notification email is still sent, and the attachment arrives without issue. I believe this is a problem with one of the two transport methods, but the logs do not tell me if it is the base mailer or swift mailer that is at issue.

I have also switched to TLS and port 587, and the same result is found.

UPDATE 2

I set the timeout in the cp mail settings to 30 seconds and now it no longer throws any errors, it still takes about 20 seconds. The command query causing the delay:

SELECT "integration"."id", "integration"."name", "integration"."handle", "integration"."type", "integration"."class", "integration"."accessToken", "integration"."settings", "integration"."forceUpdate", "integration"."lastUpdate"
FROM "freeform_integrations" "integration"
WHERE ("type"='crm') AND ("id" IS NULL)
ORDER BY "id"
LIMIT 1

Since this is related to attachments, I can remove it for now.

I cannot imagine its a bandwidth problem, its on a VPS from Vultr and I have had no other issues with delivering large assets outside of SMTP.

I have Free Form Pro 3.6.11 installed on Craft 3 Pro 3.4.22.1 in a dev environment.

Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.