I'm wondering, if I add a button to send an email from a website
page in my Odoo module.
If it's "pure" javascript, something like this:
<textarea id="myText">
Lorem ipsum...
</textarea>
<button onclick="sendMail(); return false">Send</button>
function sendMail() {
var link = "mailto:me@example.com"
+ "?cc=myCCaddress@example.com"
+ "&subject=" + escape("This is my subject")
+ "&body=" + escape(document.getElementById('myText').value)
;
window.location.href = link;
}
Suppose the email, should be a field I set up on res_company
for that, let's say loan_email
, just for example.
Is there a way I could access that field from javascript on a Odoo website page?
I mean, instead of just sending the email as this example does, to actually send it, from the email field set up on res_company
?
I hope I've explained myself, if You have doubts please let me know.