Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I am not quite sure if I get your point. You only want to send an email when you can be sure to have the correct internet connection ?</p> <p>By using the standard Mail Composer the created email will be passed to the mail app and be placed in the Apps Outbox until an internet connection is available to send the mail. You also could check before presenting the mail composer to have a specific connection (e.G. WLAN ). The thing is, the user has to press the send button to pass the mail into the mail apps outbox.</p> <p>You could compose a mail with an attachment like that (in your .m file):</p> <pre><code>-(void)displayComposerSheet { MFMailComposeViewController *mailComposer = [[MFMailComposeViewController alloc] init]; mailComposer.mailComposeDelegate = self; [mailComposer setSubject:@"This is the subject of my mail"]; // Set up recipients NSArray *toRecipients = [NSArray arrayWithObject:@"user@host.com"]; [mailComposer setToRecipients:toRecipients]; // Attach an image to the email NSString *path = [[NSBundle mainBundle] pathForResource:@"ImageName" ofType:@"png"]; NSData *myData = [NSData dataWithContentsOfFile:path]; [mailComposer addAttachmentData:myData mimeType:@"image/png" fileName:@"ImageName"]; //present the composer [self presentModalViewController:mailComposer animated:YES]; [mailComposer release]; } </code></pre> <p>Keep in mind to include into the .h file of your ViewController:</p> <pre><code>#import &lt;MessageUI/MessageUI.h&gt; #import &lt;MessageUI/MFMailComposeViewController.h&gt; </code></pre> <p>Also make the Class respond to the <code>MFMailComposeViewControllerDelegate</code> protocol.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload