How can I add a specific email recipient to my sharekit item?

爱⌒轻易说出口 提交于 2019-12-12 10:18:08

问题


So, I'm using sharekit to share some text. I need to be able to send the email to a pre-defined recipient. How can I set the mail recipient to the sharekit item?


回答1:


Sharekit has now implemented this. You can use the example below.

NSURL *url = [NSURL URLWithString:@"Your URL"];
SHKItem *item = [SHKItem URL:url title:@"Your title" contentType:SHKURLContentTypeUndefined];

NSArray *recipientArray = [NSArray arrayWithObjects:@"mail@example.com",nil];
[item setMailToRecipients:recipientArray];

[SHKMail shareItem:item];



回答2:


I found the answer here: ShareKit

UPDATE: Sharekit has an update that takes care of this now. See the newly accepted answer.



来源:https://stackoverflow.com/questions/7637500/how-can-i-add-a-specific-email-recipient-to-my-sharekit-item

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