You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use dynamic fields of a form, to set the emails recipient based on the input. I set my "to" fields with the variable seen in the screenshot. When initially sending the email all works fine. When i try to resend it in the email Logs, it fails due to email RFC validation.
I found out that the resend email action in Email Controller sets the Document again, where all fields of the documents are set to (also the recipients in the setDocumentSettings function of lib/Mail).
if ($emailLog->getDocumentId()) {
$mail->setDocument($emailLog->getDocumentId());
}
In this function call the "to-address" gets already verified and fails due to my dynamic variable not being a valid email address. Before setting the document all relevant fields are already set from the EmailLog Object. All Params are also passed of the EmailLog Object.
So why not remove the setDocument call? When resending the Email i want to resend the exact same Mail which was initially sent, the document should not be needed.
Setting dynamic fields in Mails should be possible.
The text was updated successfully, but these errors were encountered:
I use dynamic fields of a form, to set the emails recipient based on the input. I set my "to" fields with the variable seen in the screenshot. When initially sending the email all works fine. When i try to resend it in the email Logs, it fails due to email RFC validation.
I found out that the resend email action in Email Controller sets the Document again, where all fields of the documents are set to (also the recipients in the
setDocumentSettings
function of lib/Mail).In this function call the "to-address" gets already verified and fails due to my dynamic variable not being a valid email address. Before setting the document all relevant fields are already set from the EmailLog Object. All Params are also passed of the EmailLog Object.
So why not remove the setDocument call? When resending the Email i want to resend the exact same Mail which was initially sent, the document should not be needed.
Setting dynamic fields in Mails should be possible.
The text was updated successfully, but these errors were encountered: