How do I popup the compose / create mail dialog using web based email such as Gmail or Yahoo mail using c#

久未见 提交于 2019-12-12 18:14:49

问题


On my ASP.NET web page, there is a text box called box1, a text box called box2, and a button. When I click on the button, I would like it to automatically create a "Compose a new message " email screen from an already signed in web based email ID such as Yahoo or Gmail. And the recipient(s) and email body text automatically get populated from box1 and box2, respectively, from my ASP.NET web page.

Can this be done?

Thanks.


回答1:


  mailtoLink.href = "https://mail.google.com/mail?view=cm&tf=0" + 
                (emailTo ? ("&to=" + emailTo) : "") + 
                (emailCC ? ("&cc=" + emailCC) : "") +
                (emailSubject ? ("&su=" + emailSubject) : "") +
                (emailBody ? ("&body=" + emailBody) : "");

for yahoo

URI encoding in Yahoo mail compose link



来源:https://stackoverflow.com/questions/5330116/how-do-i-popup-the-compose-create-mail-dialog-using-web-based-email-such-as-gm

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!