Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending Fails Silently #95

Open
putyourlightson opened this issue Sep 27, 2017 · 7 comments
Open

Sending Fails Silently #95

putyourlightson opened this issue Sep 27, 2017 · 7 comments

Comments

@putyourlightson
Copy link

Feature request: add error reporting to the controller action actionSendMessage() when email sending fails.

When email sending fails, there is no error reporting so the user may assume that the form was successfully sent when in fact it was not. This was a major issue on a site I recently worked on, in which the client lost a week of contact form submissions due to the sending failing silently.

@jnaklaas
Copy link

+1

@mstenquist
Copy link

+1 - Did you ever figure out what was wrong? I'm dealing with something similar. :(

@kaspar-allenbach
Copy link

+1

Radabaugh pushed a commit that referenced this issue Apr 12, 2018
Added try catch to $mailer->send() to catch any mailer specifc errors.
@Radabaugh Radabaugh self-assigned this Apr 12, 2018
@sanscheese
Copy link

This could be related to my thoughts of having form submissions be placed into a queue (with a cron set to trigger the queue consistently). I started looking into this but ended up using a different method for my needs.

I wasn't sure if it would be a best practice or not to use default Craft/Yii queue (or better to set up a separate one). For sensitive contact information I didn't want them stored in the DB forever, but wanted them until confirm of being processed correctly. If something goes wrong (e.g SMTP fails for whatever reason) then it can be debugged and the queue processed again.

@Friksel
Copy link

Friksel commented May 1, 2020

+1 for at least being able to check to let the user know the email is technically successfully sent. It's pretty critical now that both clients trying to contact a company as well as companies needing to know that a (potential) client is trying to reach them aren't aware that a mail couldn't even be sent.

@rezaplus
Copy link

+1 in 2023

@aldisaglobal
Copy link

+1 in 2024

In Mailer.php, mail is sent in this code block at Line 115:

foreach ($event->toEmails as $toEmail) {
            $message->setTo($toEmail);
            $mailer->send($message);
}

Seems from history of this post that this problem was handled in the earlier version of this plugin:
[https://github.com/craftcms/contact-form/commit/0ef88f4f7c15d5b09e9c0b337c24fc58eec7488a](Fixes #95)

I am interested to know if there is a reason why this has not been implemented in the current version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants