<tfoot id='YZXmk'></tfoot>

      <small id='YZXmk'></small><noframes id='YZXmk'>

      <legend id='YZXmk'><style id='YZXmk'><dir id='YZXmk'><q id='YZXmk'></q></dir></style></legend>

        • <bdo id='YZXmk'></bdo><ul id='YZXmk'></ul>
      1. <i id='YZXmk'><tr id='YZXmk'><dt id='YZXmk'><q id='YZXmk'><span id='YZXmk'><b id='YZXmk'><form id='YZXmk'><ins id='YZXmk'></ins><ul id='YZXmk'></ul><sub id='YZXmk'></sub></form><legend id='YZXmk'></legend><bdo id='YZXmk'><pre id='YZXmk'><center id='YZXmk'></center></pre></bdo></b><th id='YZXmk'></th></span></q></dt></tr></i><div id='YZXmk'><tfoot id='YZXmk'></tfoot><dl id='YZXmk'><fieldset id='YZXmk'></fieldset></dl></div>

        iphone smtp 客户端库

        时间:2023-06-11
      2. <i id='fPPOE'><tr id='fPPOE'><dt id='fPPOE'><q id='fPPOE'><span id='fPPOE'><b id='fPPOE'><form id='fPPOE'><ins id='fPPOE'></ins><ul id='fPPOE'></ul><sub id='fPPOE'></sub></form><legend id='fPPOE'></legend><bdo id='fPPOE'><pre id='fPPOE'><center id='fPPOE'></center></pre></bdo></b><th id='fPPOE'></th></span></q></dt></tr></i><div id='fPPOE'><tfoot id='fPPOE'></tfoot><dl id='fPPOE'><fieldset id='fPPOE'></fieldset></dl></div>

            <bdo id='fPPOE'></bdo><ul id='fPPOE'></ul>

              <tbody id='fPPOE'></tbody>
            • <small id='fPPOE'></small><noframes id='fPPOE'>

              <legend id='fPPOE'><style id='fPPOE'><dir id='fPPOE'><q id='fPPOE'></q></dir></style></legend>

                  <tfoot id='fPPOE'></tfoot>
                1. 本文介绍了iphone smtp 客户端库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  任何人都知道用于 iphone 应用程序的 Objective-c smtp 库.

                  any one knows an objective-c smtp library for use in iphone app.

                  我使用 skpsmtpmessage http://code.google.com/p/skpsmtpmessage/ 但是在向 gmail 发送邮件时,它会将邮件正文作为附件发送.

                  I use skpsmtpmessage http://code.google.com/p/skpsmtpmessage/ but it sends message body as attachment when send mail to gmail.

                  谢谢.

                  推荐答案

                  尝试使用https://github.com/MailCore/mailcore2.它是异步的,支持大部分邮件协议.

                  Try to use https://github.com/MailCore/mailcore2. It is Asynchronous and support most of mail protocol.

                  查看发送邮件示例:

                   MCOSMTPSession *smtpSession = [[MCOSMTPSession alloc] init];
                   smtpSession.hostname = @"smtp.gmail.com";
                   smtpSession.port = 465;
                   smtpSession.username = @"matt@gmail.com";
                   smtpSession.password = @"password";
                   smtpSession.authType = MCOAuthTypeSASLPlain;
                   smtpSession.connectionType = MCOConnectionTypeTLS;
                  
                   MCOMessageBuilder *builder = [[MCOMessageBuilder alloc] init];
                   MCOAddress *from = [MCOAddress addressWithDisplayName:@"Matt R"
                                                        mailbox:@"matt@gmail.com"];
                   MCOAddress *to = [MCOAddress addressWithDisplayName:nil 
                                                      mailbox:@"hoa@gmail.com"];
                   [[builder header] setFrom:from];
                   [[builder header] setTo:@[to]];
                   [[builder header] setSubject:@"My message"];
                   [builder setHTMLBody:@"This is a test message!"];
                   NSData * rfc822Data = [builder data];
                  
                     MCOSMTPSendOperation *sendOperation = 
                     [smtpSession sendOperationWithData:rfc822Data];
                     [sendOperation start:^(NSError *error) {
                     if(error) {
                         NSLog(@"Error sending email: %@", error);
                     } else {
                         NSLog(@"Successfully sent email!");
                     }
                  }];
                  

                  这篇关于iphone smtp 客户端库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:使用带有 smtp 但没有 SSL 的 JavaMail API 在 android 中发送电子邮件 下一篇:在android中维护会话(应用程序在服务器端保持身份验证)

                  相关文章

                  <legend id='FMS0y'><style id='FMS0y'><dir id='FMS0y'><q id='FMS0y'></q></dir></style></legend>

                  1. <small id='FMS0y'></small><noframes id='FMS0y'>

                      <tfoot id='FMS0y'></tfoot>
                    1. <i id='FMS0y'><tr id='FMS0y'><dt id='FMS0y'><q id='FMS0y'><span id='FMS0y'><b id='FMS0y'><form id='FMS0y'><ins id='FMS0y'></ins><ul id='FMS0y'></ul><sub id='FMS0y'></sub></form><legend id='FMS0y'></legend><bdo id='FMS0y'><pre id='FMS0y'><center id='FMS0y'></center></pre></bdo></b><th id='FMS0y'></th></span></q></dt></tr></i><div id='FMS0y'><tfoot id='FMS0y'></tfoot><dl id='FMS0y'><fieldset id='FMS0y'></fieldset></dl></div>
                      • <bdo id='FMS0y'></bdo><ul id='FMS0y'></ul>