fix: remove redundant senderEmail empty check before setFrom

This commit is contained in:
harsh mahajan
2026-05-20 16:25:04 +05:30
parent d3994b436d
commit 43b9bf8152
@@ -128,10 +128,7 @@ class Update extends Action
$mail->Host = $smtp['host'] ?? '';
$mail->Port = $smtp['port'] ?? '';
$mail->SMTPSecure = $smtp['secure'] ?? '';
if (!empty($smtp['senderEmail'] ?? '')) {
$mail->setFrom($smtp['senderEmail'], $smtp['senderName'] ?? '');
}
$mail->setFrom($smtp['senderEmail'] ?? '', $smtp['senderName'] ?? '');
if (!empty($smtp['username'] ?? '')) {
$mail->SMTPAuth = true;