This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 4

Fatal error: Uncaught exception 'Swift_RfcComplianceException'


  1. helge
    Member

    Hi, we are getting this error on some of our forms in our Machform version 4.3:

    "Fatal error: Uncaught exception 'Swift_RfcComplianceException' with message 'Address in mailbox given [{element_5}] does not comply with RFC 2822, 3.6.2.' in /var/www/app/skjemaker/htdocs/lib/swift-mailer/classes/Swift/Mime/Headers/MailboxHeader.php:352 Stack trace: 0 /var/www/app/skjemaker/htdocs/lib/swift-mailer/classes/Swift/Mime/Headers/MailboxHeader.php(264):
    Swift_Mime_Headers_MailboxHeader->_assertValidAddress('{element_5}') 1 /var/www/app/skjemaker/htdocs/lib/swift-mailer/classes/Swift/Mime/Headers/MailboxHeader.php(108): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array) 2 /var/www/app/skjemaker/htdocs/lib/swift-mailer/classes/Swift/Mime/Headers/MailboxHeader.php(65): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array) 3 /var/www/app/skjemaker/htdocs/lib/swift-mailer/classes/Swift/Mime/SimpleHeaderFactory.php(60): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel(Array) 4 /var/www/app/skjemaker/htdocs/lib/swift-mailer/classes/Swift/Mime/SimpleHeaderSet.php(70): Swift_Mime_SimpleHeaderFactory in /var/www/app/skjemaker/htdocs/lib/swift-mailer/classes/Swift/Mime/Headers/MailboxHeader.php on line 352 "

    We found out that if we have a form where the email field is removed, and added again, the error message appears.
    Furthermore, we can find that the form is still connected the old email field (in our case the email field with name element_5, where the new email field is named element_6).
    The solution for us was to go to notifications, unclick the notification check-box, and then Save Settings. And then repeat: go to notifications, and check the notification check-box, Save Settings. In this way the form got updated so the correct email field was used (in our case, element_6).
    We had several forms where the email field was removed and added again, which again led to that hundreds of emails not being sent out.
    Would it be possible to add a check to Machform that would test if ‘Send Sonfirmation Email to User’ is checked, and ‘User Email’ address is present in the form, *and* Email address field name (element_N) does exist, then return TRUE, else, return FALSE.
    In this case, users who remove and add the email field will see an error message under ‘Notification Settings’ -> ‘Send Confirmation Email to User’, and indicate that they have to update the ‘User Email Address’ field to an existing email field in the form.
    Or even better, auto update so the ‘Send Confirmation Email to User’ -> ‘User Email Address’ field is always connected to the latest email field added to the form?
    Thank you,
    Helge

    Posted 7 years ago #

RSS feed for this topic

Reply