我正在開發(fā)一個小應用程序,我想在其中包含一個按鈕,該按鈕將打開 Outlook 電子郵件編輯器并向用戶呈現(xiàn)空內(nèi)容,但特定主題可供用戶填寫并發(fā)送回特定電子郵件。有誰知道這是怎么做到的嗎?我在不同的解決方案中讀到的內(nèi)容不起作用:例如,這會打開一個失敗的網(wǎng)址import ipyvuetify as vv_btn = v.Btn(class_ = 'mx-2 light-blue darken-1', href = 'href="mailto:vinoth@email.com?subject=title&body=The message"', children = ['send email?'])v_btn其他選項可能是創(chuàng)建一個 ipyvuetify 模板:class sendemail(v.VuetifyTemplate): subject = Unicode('').tag(sync=True) label = Unicode('email').tag(sync=True) template = Unicode('''<v-btn color="primary" class="ma-1" @click="sendemail(subject)" > {{ theemail }} </v-btn> <script> export default { methods: { sendemail (subject) { var email = "whatever@company.org"; document.location = "mailto:" + email +"?subject=" + subject + "&body=the body"; }, }, } </script>''').tag(sync=True) emailitBtn = clipboardBtn(subject='This is the subject of the email', label='send email')emailitBtn但這個解決方案也不起作用。有任何想法嗎?
1 回答

哆啦的時光機
TA貢獻1779條經(jīng)驗 獲得超6個贊
也許嘗試一下
import ipyvuetify as v
v_btn = v.Btn(class_ = 'mx-2 light-blue darken-1',
href = 'mailto:vinoth@email.com?subject=title&body=The message',
target = '_blank',
children = ['send email?'])
v_btn
我刪除了 href 屬性中的“href”,并添加了 target='_blank' 以在新窗口中打開它,它似乎可以工作。
添加回答
舉報
0/150
提交
取消