ios发电子邮件
ios发电子邮件
by 吴雪莹
第一:
NSString *myEmail = @"3423423423@qq.com";
NSString *toemail = @"asdfasdf@gmail.com";
NSString *emailDetail = [NSString stringWithFormat:@"mailto:%@? cc=%@&subject=Feedback!&body=Dear:",toemail,myEmail];
[[UIApplication sharedApplication] openURL: [NSURL URLWithString: emailDetail]];
另外一种:
- (void)displayMailPicker {
MFMailComposeViewController *mailPicker = [[MFMailComposeViewController alloc] init];
mailPicker.mailComposeDelegate = self;
[mailPicker setSubject: @"Feedback!"];
NSArray *toRecipients = [NSArray arrayWithObject: @"3434234@qq.com"];
[mailPicker setToRecipients: toRecipients];
NSArray *ccRecipients = [NSArray arrayWithObjects:@"asdfa@gmail.com", nil];
[mailPicker setCcRecipients:ccRecipients];
// add a picture
UIImage *addPic = [UIImage imageNamed: @"icon_logo@2x.png"];
NSData *imageData = UIImagePNGRepresentation(addPic);
[mailPicker addAttachmentData: imageData mimeType: @"" fileName: @"Icon.png"];
NSString *emailBody = @"<font size='4'>Dear:</font>";
[mailPicker setMessageBody:emailBody isHTML:YES];
[self presentViewController:mailPicker animated:YES completion:nil];
}
- (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error {
[self dismissViewControllerAnimated:YES completion:nil];
}
另一种普遍使用
版权声明:本文博主原创文章,博客,未经同意不得转载。
ios发电子邮件的更多相关文章
- telnet发电子邮件
无聊今天的工作,想想一个学生被提到最后一次telnet发电子邮件,所以我想试试.最后,成功的实践,这里做个总结. 首先,cmd进telnet打开回话: 下面红色字体为命令. 1.open smtp.1 ...
- **iOS发JSON请求中字符串加转义,返回的JSON去转义
iOS中使用NSSerialization把对象转为JSON字符串后,多出来反斜杠的问题 http://segmentfault.com/q/1010000000576646 NSDictionary ...
- iOS发版出现“No iTunes Connect access for the team”的问题的解决方式
要发个新版本,结果发现,老是提示我“No iTunes Connect access for the team”,出现以下错误: 图1 错误提示: No accounts with iTunes ...
- python3使用smtplib发电子邮件
smtplib模块smtp简单邮件传输协议client实现.对于多功能性,有时,当你要发送带附件的邮件或图片,使用email.mime加载内容. 码,如以下: import smtplib impor ...
- iOS 发光字流水
{ CAGradientLayer *_gradientLayer; NSInteger count; } - (void)addLabel{ // 创建UILabel UILabel *label ...
- [置顶] IOS 基础入门教程
IOS 基础入门教程 教程列表: IOS 简介 IOS环境搭建 Objective C 基础知识 创建第一款iPhone应用程序 IOS操作(action)和输出口(Outlet) iOS - 委托( ...
- WordPress添加评论回复的电子邮件警报通知
评论回复帖子,主动发送电子邮件通知评论员,这是提高的一大举措的用户体验.倡导孟一直在使用Willin Kan主评论回复电子邮件警报通知码,我相信很多人也使用,假设你没有使用.最好的尝试. 根据自己的需 ...
- 移动端web开发
meta基础知识点: 页面自动调整到设备宽度,并禁止用户缩放. <meta name="viewport" content="width=device-width, ...
- H5移动端知识点总结
H5移动端知识点总结 阅读目录 移动开发基本知识点 calc基本用法 box-sizing的理解及使用 理解display:box的布局 理解flex布局 Flex布局兼容知识点总结 回到顶部 移动开 ...
随机推荐
- hibernate.cfg.xml文件的配置模板和不同数据库的配置參数
(1)hibernate.cfg.xml文件的配置模板 <?xml version="1.0" encoding="UTF-8"?> <!DO ...
- 关于Thread类中三个interrupt方法的研究与学习(转)
先看三个方法原型: public void interrupt(): public boolean isInterrupted(): public static boolean interrupted ...
- 2014年Windows平台软件推荐:神器小工具(骨灰级
原文 http://www.wtoutiao.com/a/120621.html 底层工具 “If you know how to use Process Monitor competently, ...
- 打造你自己ajax上传图片
今天,我们需要的图片上传插件,但是,互联网不提供符合他们的需要和易于使用的.所以我写了自己. 方法1,只使用jquery代码,.代码例如以下 <p> <label>上传图片&l ...
- A Game of Thrones(19) - Jon
The courtyard rang to the song of swords. Under black wool, boiled leather, and mail, sweat trickled ...
- Windbg的gflags.exe -- Attach调试利器
有没有碰到过程序启动就因为异常直接crash?有没有碰到程序启动之后什么反应也没有?有没有碰到过程序启动之后去触发另一个进程失败?有没有碰到别人的程序调用了你的代码,出现问题以后,让你来调查,而你只有 ...
- 斯坦福ML公开课笔记15—隐含语义索引、神秘值分解、独立成分分析
斯坦福ML公开课笔记15 我们在上一篇笔记中讲到了PCA(主成分分析). PCA是一种直接的降维方法.通过求解特征值与特征向量,并选取特征值较大的一些特征向量来达到降维的效果. 本文继续PCA的话题, ...
- hdu 1251 统计难题 (map水过)
# include <stdio.h> # include <algorithm> # include <string> # include <map> ...
- 在word 中复选框划勾或叉的方法
输入大写字母R.大写字母Q ,然后将字体改为Wingdings 2, 就分离得到带框的勾和叉.
- hdu3033(变形分组背包)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3033 题意:Iserlohn要买鞋,有k种牌子,每种牌子至少买一双鞋子.每双鞋子有标价跟实际价值.求用 ...