Form displays sending error when using Mailgun module even though it sends correctly.

Created on 14 August 2024, 3 months ago
Updated 28 August 2024, 3 months ago

Problem/Motivation

When using the Mailgun module I receive a "There was a problem sending your message and it was not sent." error when submitting the contact form. However, the email was sent fine. The issue seems to be line 246 of src/Form/ContactForm.php that checks if $result['result'] !== TRUE. Mailgun however returns an object with an id and message.

  "result" => Mailgun\Model\Message\SendResponse {#2598 β–Ό
    -id: "<20240814210540.123456789abcd@example.com>"
    -message: "Queued. Thank you."
  }

Proposed resolution

Reverse the check to

$result['result'] === FALSE

or simplify it to

if (empty($result['result']))
πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jphelan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024