Results 1 to 8 of 8

Thread: PHP Fatal error: Uncaught exception 'Swift_RfcComplianceExce

  1. #1
    New user
    Join Date
    07-14-10.
    Posts
    5

    Default PHP Fatal error: Uncaught exception 'Swift_RfcComplianceExce

    Hello

    I just discovered that after an update 10 days ago my forms no longer work in my website. When someone submits a form, this error happens :"PHP Fatal error: Uncaught exception 'Swift_RfcComplianceException' with message 'Address in mailbox given [] does not comply with RFC 2822, 3.6.2.' thrown in /home/www/pelikan-rejser.dk/plugins/swiftmailer/classes/Swift/Mime/Headers/MailboxHeader.php on line 309 "

    Does anyone have any idea what is happening? I am using the same email recipient address as always.

    Thank you, Mikael

  2. #2
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: PHP Fatal error: Uncaught exception 'Swift_RfcCompliance

    plugins/swiftmailer/classes/Swift/Mime/Headers/MailboxHeader.php on line 309
    See if you can update swiftmailer in the Extension Catalog...
    If that fails... do a search on swiftmailer
    If that fails...
    Post the code around this line.... it would seem the version of swiftmailer you are using is not compatable with the version of Contao you are using

  3. #3
    New user
    Join Date
    07-14-10.
    Posts
    5

    Default Re: PHP Fatal error: Uncaught exception 'Swift_RfcCompliance

    Thanks for helping. The Swiftmailer is the one that came with the contao installation. So, I am not sure what you mean by not compatible. They should be compatible, right? Otherwise most other users would get the same error, or no?

    The code around line 309 is this:

    private function _assertValidAddress($address)
    {
    if (!preg_match('/^' . $this->getGrammar('addr-spec') . '$/D',
    $address))
    {
    throw new Swift_RfcComplianceException(
    'Address in mailbox given [' . $address .
    '] does not comply with RFC 2822, 3.6.2.'
    );
    }
    }

    I would be greatful if someone could, at least as a hack, show me how to eliminate this part of the code. I wouldn't mind receiving invalid email adresses once in a while.


    Thanks, Mikael

    Edit: I just realized that the exception is thrown because of the recipient email adress. not because of customers submitting invalid email adresses. Well... can anyone help anyway?

  4. #4
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: PHP Fatal error: Uncaught exception 'Swift_RfcCompliance

    They should be compatible, right?
    yeah, sorry I thought it was an extension (module) - not a plugin.

    Maybe replace this plugin with the old one from the Version you updated from until you can figure it.

  5. #5
    New user
    Join Date
    07-14-10.
    Posts
    5

    Default Re: PHP Fatal error: Uncaught exception 'Swift_RfcCompliance

    I can't replace the swiftmailer plugin because the version I updated from was something like 2.7.2 in which there was no swiftmailer plugin.

    I think I am stuck...

  6. #6
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: PHP Fatal error: Uncaught exception 'Swift_RfcCompliance

    You can just comment out where it throws the exception, but when you upgrade you'll need to do it again if that file gets overwritten.

    //throw new Swift_RfcComplianceException('Address in mailbox given [' . $address .'] does not comply with RFC 2822,3.6.2.');

  7. #7
    User
    Join Date
    06-19-09.
    Posts
    328

    Default Re: PHP Fatal error: Uncaught exception 'Swift_RfcCompliance

    Hi mikros

    the error means that the address you are using is not a valid email address, so you have to check that both the "from" email address and the "to" email address are set correctly.
    Consulenza Contao CMS https://www.intco.it

  8. #8
    New user
    Join Date
    07-14-10.
    Posts
    5

    Default Re: PHP Fatal error: Uncaught exception 'Swift_RfcCompliance

    Possible solution:

    ok.... it turns out that the administrator email adress in the settings page had been deleted in the update process and that this was the source of the error. I am going to test this and hopefully that was the only problem.

    Thanks for all your help!

    -Mikael

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •