Search code examples
htmlemailurlvaadinmailto

I can't open the mailer with body too long in vaadin


Sorry for my english My problem is this, I open the manager OS Prefinished mails and charge information in the body. For that use the MailTo html and body SETTING but if the body is very long URL exceeds the limit and I do not open anything. Any possible solution to my problem? Any way to create a vaadin txt and attach the mail could also serve.


Solution

  • You are hitting the limits of the mailto URL - basically, the maximum length of any mailto URL is around 2000 characters; this is not a Vaadin limitation, but a browser one. See this similar SO question for more details

    You cannot create an email on the "client " longer than that, at least not via a mailto url.

    The only alternative that I am aware of is to create and send the email from the web-application itself, i.e. on the server side, using SMTP/JavaMail API

    That does assume that

    1. You have an SMTP server to send mail via
    2. You don't haven't got an "open" application that allows anyone to send an email (e.g. could your application be open to sending spam)