Skip to main content
Inspiring
March 26, 2019
Question

Send email with JavaScript

  • March 26, 2019
  • 1 reply
  • 966 views

Hi there,

The question is really silly but could not find anything ...

How do I send an email with JS attached to button?

What is the line?

Thanks in advance

B

    This topic has been closed for replies.

    1 reply

    Pkoel
    Inspiring
    March 26, 2019

    Hello,

    Check this out:

    In the address field I have this:

    pkoel@americanbus.com?subject=ACES%20Template_Formatting%20Comments%20&body=I%20have%20the%20following%20comments%20or%20suggestions%20about%20the%20course

    The %20 is code for a space and (the text spans three lines above), but is all one string. No Java needed. this will open the viewer's default mail client and add the text to a new email message. All the user will need to do is hit send.

    Peter

    Inspiring
    March 26, 2019

    Thanks for that Pkoel,

    I am trying to use that out of the box option but the links are blocked from the browser. I guess I need to try with JS and see if it works...

    Thanks

    Inspiring
    March 26, 2019

    Actually I found the answer - window.open("mailto:mail@domain.com"); set to Parent

    But would be interesting to see what other options could be added there. CC, body and others.