Reputation: 99
Using the Window.open mailto: to send an email from my app. It opens up the email software and fills in whoever is being emailed just fine, but I can't seem to fill in the subject field.
methods: {
email: function(event) {
let mail =
"mailto:[email protected]?" +
"&subject=" +
escape("This is my subject");
window.location.href = mail;
}
}
Upvotes: 0
Views: 137
Reputation: 207527
It should not have the & if it is the only parameter
methods: {
email: function(event) {
let mail =
"mailto:[email protected]?" +
"subject=" +
encodeURIComponent("This is my subject");
window.location.href = mail;
}
}
Upvotes: 2