简体   繁体   中英

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

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.

  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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM