Skip to content

Commit

Permalink
Fixed a bug causing the Confirmation message sending to fail (#73)
Browse files Browse the repository at this point in the history
* Fixed a bug causing the Confirmation message sending to fail

When the system-wide configuration of “Sender E-mail Address” was done as an environmental variable, that variable wasn’t resolved and the variable name was passed as a “from” e-mail address, which caused SwiftMailer to fail on e-mail addressa format validation.

* Removed unused import referring to a non-existing class
  • Loading branch information
janklan authored and Rias committed Aug 9, 2019
1 parent b580b8c commit e1506ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ContactFormExtensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function init()
$message = new Message();
$message->setTo($e->submission->fromEmail);
if (isset(App::mailSettings()->fromEmail)) {
$message->setFrom(App::mailSettings()->fromEmail);
$message->setFrom(Craft::parseEnv(App::mailSettings()->fromEmail));
} else {
$message->setFrom($e->message->getTo());
}
Expand Down

0 comments on commit e1506ae

Please sign in to comment.