Error when posting invalid email address

When creating a subject containing a quote block with an email address, user get an «internal server error»,

The problem appeared since upgrade to last version of discourse.


i can reproduce trying to create a discussion«citing» this message on our instance :

NB : it also fail on

> This message was created automatically by mail delivery software.
> A message that you sent could not be delivered to one or more of its
> recipients. This is a permanent error. The following address(es) failed:
>     host []
>     SMTP error from remote mail server after end of data:
>     550 5.7.1 Unconfigured Sending Domain <>
> Action: failed
> Final-Recipient: rfc822;
> Status: 5.0.0
> Remote-MTA: dns;
> Diagnostic-Code: smtp; 550 5.7.1 Unconfigured Sending Domain <>

Log :

URI::InvalidComponentError (unrecognised opaque part for mailtoURL: rfc822;
/usr/local/lib/ruby/2.4.0/uri/mailto.rb:150:in `initialize'

It doesn’t have to be inside a quote block. Trying to post an invalid email address like rfc822; is enough to trigger the error.


Thanks @ixeft for reporting this issue. It’s now fixed :pizza: