gpt4 book ai didi

objective-c - 使用 cocoa 自动生成邮件

转载 作者:行者123 更新时间:2023-12-03 17:41:09 26 4
gpt4 key购买 nike

我无法清楚地理解这段代码,因为我是 cocoa 的新手。那么有人可以帮我解释一下这段代码吗?提前致谢

NSString *emailString = [NSString stringWithFormat:@"\
tell application \"Mail\"\n\
set newMessage to make new outgoing message with properties {subject:\"%@\", content:\"%@\" & return} \n\
tell newMessage\n\
set visible to false\n\
set sender to \"%@\"\n\
make new to recipient at end of to recipients with properties {name:\"%@\", address:\"%@\"}\n\
tell content\n\
",subject, bodyText, @"McAlarm alert", @"McAlarm User", toAddress ];

最佳答案

SBSendMail是在cocoa中发送电子邮件的最佳方式

SBSendMail

关于objective-c - 使用 cocoa 自动生成邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14373763/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com