Sorry if this is a silly question, but I'm somewhat new to R. Currently I have an R Markdown script that generates an HTML file. I would like a function that works similarly to the HTML mailto function below in order to generate an email.
<a href="mailto:email@example.com?subject=Subject&body=Text">Send Email</A>
Several problems with just using the above code:
- My Markdown script loops and I want a link for each of those loops, with different recepients and information in the body.
- The information in the body is relatively long (several hundred words) and contains links and tables.
I think I could use something like glue or str_glue to create a character variable with all that information and then input that into the HTML code. But this seems very difficult and would probably limit functionality like sending links or tables.
I also think there is more functionality in something like javascript to create emails, but I'm not very familiar with javascript, and not sure there's a way to get the information I have pulled in the R parts of my code (email addresses and unique information for the body of the email) into whatever email that javascript code would produce.
I do not want to automatically email anything, only to generate the email in the user's own email service (Outlook) so that they can review it and hit 'send.'
Thanks in advance.