Sending Image to Faceless Email

I am trying to send a faceless email (by sending an email without displaying an interface) using the following code.

I also want to attach an image to this letter.

Is it possible?

- (void) sendEmailTo:(NSString *)toStr withSubject:(NSString *)subjectStr withBody:(NSString *)bodyStr
{
    NSString *emailString=[[NSString alloc] initWithFormat:@"mailto:?to=%@&subject=%@&body=%@",
                           [toStr stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding],
                           [subjectStr stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding],
                           [bodyStr stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]];

    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:emailString]];

    [emailString release];
}
+3
source share
1 answer

You cannot send faceless emails using the built-in mail device. However, you should be able to rewind your own mail server using parts from email frameworks such as Pantomime

+5
source

Source: https://habr.com/ru/post/1747972/


All Articles