test that the correct url including host and protocol is generated for attachments in an email. note the added :only_path option here, which defaults to true, which should mirror the original behavior.