Should support compose URI for mail



  • Mail should support a compose URI that browsers can convert mailto links to (via HTML's [url=http://www.whatwg.org/specs/web-apps/current-work/#dom-navigator-registerprotocolhandler]registerProtocolHandler()[/url] for example) so that vivaldi mail can be set as the default mail client in the browser.

    Example URI:
    [code]
    https://mail.vivaldi.net/webmail/?_task=mail&_action=compose&url=mailto%3Atest%40example.com%3Fsubject%3Dtest%20subject
    [/code]

    That should load a compose page with "test@example.com" in the To field and "test subject" in the subject field.

    http://shadow2531.com/sm/html5_mailto.zip is a PHP example for Squirrelmail if needed for an example of how it works. The "Gmail_URL" one in http://shadow2531.com/opera/userjs/BeforeMailtoURL.js is another example.

    As a bonus, it'd be nice to have a Windows app that registered itself ad the default handler for the mailto protocol that loaded the compose URI in the default browser.



  • Hey

    Thanks for this suggestion we will look into this.



  • Thanks.<br /><br />I see in "Settings -> User Interface -> Browsing options" that support for HTML5's registerProtcolHandler is there. And, it works.<br /><br />So, this is implemented already.<br /><br />The URL format is:<br /><br /><pre>
    https://mail.vivaldi.net/webmail/?_task=mail&_action=compose&_to=%s
    </pre><br />where %s is replaced with the whole mailto URI percent-encoded.<br /><br />For example, if the mailto URI is"<br /><br /><pre>
    mailto:?body=line1%0D%0Aline2
    </pre><br />, the compose link would be:<br /><br /><pre>
    https://mail.vivaldi.net/webmail/?_task=mail&_action=compose&_to=mailto%3A%3Fbody%3Dline1%0D%0Aline2
    </pre><br />where you get:<br /><br /><pre>
    line1
    line2
    </pre><br />in the body.<br /><br />One issue I see so far is that if you have "Compose HTML messages" set to "Always" for example, the composer that you get from the link is a plain text one. The rich text editor doesn't load.<br /><br />What should really happen in this case is that:<br /><br /><pre>
    line1
    line2
    </pre><br />should be converted to:<br /><br /><pre>
    line1<br>line2
    </pre><br />and inserted in the source so that it's HTML, but formatted like the plain text would be.<br /><br />Or, to do that another way:<br /><br /><pre>
    <pre>line1
    line2</pre>
    </pre><br />(properly-escaped of course in either case, so nothing is interpreted as markup).<br /><br />Or, at the least, allow to convert to HTML compose mode after the plain text composer loads.<br /><br /><br />The other issue is more severe:<br /><br />Say you want to mail to:<br /><br /><pre>
    "Bob the Builder" bob@example.com
    </pre><br />In the source of an HTML page, you'd represent that as:<br /><br /><pre>
    <a href="mailto:%22Bob%20the%20Builder%22%20%3Cbob%40example.com%3E">contact me</a>
    </pre><br />in which registerProtcolHandler would emit:<br /><br /><pre>
    https://mail.vivaldi.net/webmail/?_task=mail&_action=compose&_to=mailto%3A%22Bob%20the%20Builder%22%20%3Cbob%40example.com%3E
    </pre><br />when you click on the likn, which would be decoded by the server back to the mailto URI of:<br /><br /><pre>
    mailto:%22Bob%20the%20Builder%22%20%3Cbob%40example.com%3E
    </pre><br />The To value then needs to be percent-decoded by the server and:<br /><br /><pre>
    "Bob the Builder" bob@example.com
    </pre><br />should be placed in the To field of the composer.<br /><br />However, with vivaldi mail, you get:<br /><br /><pre>
    %22Bob%20the%20Builder%22%20%3Cbob%40example.com%3E
    </pre><br />in the To field.<br /><br />It works fine with Gmail's compose URI of:<br /><br /><pre>
    https://mail.google.com/mail/?extsrc=mailto&url=mailto%3A%22Bob%20the%20Builder%22%20%3Cbob%40example.com%3E
    </pre><br />In short, vivaldi mail isn't percent-decoding the part between 'mailto:' and '?' (or end of string) (and stripping newlines or converting them to spaces) before putting it in the To field. <br /><br />It works fine with cc because cc is after the '?' in the mailto URI and the server does the percent-decoding there no problem.



  • (y)


Log in to reply
 

Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.