Skip to content

Do not fail a lead conversion when SMTP is not configured - #4

Merged
HafizMMoaz merged 1 commit into
masterfrom
fix/smtp-500-on-convert
Jul 16, 2026
Merged

Do not fail a lead conversion when SMTP is not configured#4
HafizMMoaz merged 1 commit into
masterfrom
fix/smtp-500-on-convert

Conversation

@HafizMMoaz

Copy link
Copy Markdown
Member

SetConfigEmail() throws when the company has no mail host configured:

Exception: Email host is not configured   (Helper.php:571)

In convertToDeal() both the verification email and the welcome email are sent after the client is created and before the deal is made, and neither was guarded. A company without SMTP got a 500 and a half-finished conversion: the client existed, the deal never did.

Both sends are now wrapped and the reason logged. The conversion completes and the client is still created.

Same root cause as the core app's user-creation 500, fixed there in the same batch. Reproduced locally by pointing mail at a host that fails with verification on.

SetConfigEmail() throws when the company has no mail host set. In
convertToDeal() both sends sit after the client is created and before the deal
is made, so an unconfigured mail server returned a 500 and left the conversion
half done: client created, deal never made.

Both sends are now guarded and the reason logged. The conversion completes.
@HafizMMoaz
HafizMMoaz requested a review from a team as a code owner July 16, 2026 15:10
@HafizMMoaz
HafizMMoaz merged commit 236afe0 into master Jul 16, 2026
2 checks passed
@HafizMMoaz
HafizMMoaz deleted the fix/smtp-500-on-convert branch July 16, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant