2012-11-07 4 views
1

, 나는 이메일을 보낼 수있는 방법이 Pagesheet없이 작성 UI를 열지 않고 장치에 구성된 표준 계정을 사용하여, 거기에 아이폰 프로그래밍IOS 전자 메일 응용 프로그램

새로운 오전?

나에게 이메일 알리미를 보내려면 앱을 작성하고 싶습니다. 당신

감사에서 재생을 듣고 기대

...

답변

0

1) 작성 UI를

아니 당신은 할 수 없습니다를 개방하지없이 장치 에 구성된 표준 계정을 사용하여 이메일을 보낼 수있는 방법이 있나요.

대체 방법 :

당신은 특정 주소로 이메일을 전송하는 웹 서비스를 작성할 수 있습니다.

1

당신은 관리 서버에 정보를 보내고 단지 SMTP 형 방식을 통해 이메일을 보내해야합니다.

+0

..? 제발 도와주세요 –

+0

@MaulikVekariya 그는 단지 webservice를 만들고 거기를 통해 이메일을 보내는 것이라고 말하고 있습니다. –

+0

좋습니다, 감사합니다 .... –

1

당신은

this SMTPSender 예를 참조 백그라운드에서 이메일이 어떤 작곡가 창을 사용하여 witj 보냈 할 수

예 : 내가 유 말을 이해 해달라고

- (BOOL)send 
{ 
    NSAssert(sendState == kSKPSMTPIdle, @"Message has already been sent!"); 

    if (requiresAuth) 
    { 
     NSAssert(login, @"auth requires login"); 
     NSAssert(pass, @"auth requires pass"); 
    } 

    NSAssert(relayHost, @"send requires relayHost"); 
    NSAssert(subject, @"send requires subject"); 
    NSAssert(fromEmail, @"send requires fromEmail"); 
    NSAssert(toEmail, @"send requires toEmail"); 
    NSAssert(parts, @"send requires parts"); 

    if (![relayPorts count]) 
    { 
     [delegate messageFailed:self 
          error:[NSError errorWithDomain:@"SKPSMTPMessageError" 
                code:kSKPSMTPErrorConnectionFailed 
               userInfo:[NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Unable to connect to the server.", @"server connection fail error description"),NSLocalizedDescriptionKey, 
                  NSLocalizedString(@"Try sending your message again later.", @"server generic error recovery"),NSLocalizedRecoverySuggestionErrorKey,nil]]]; 

     return NO; 
    } 

    // Grab the next relay port 
    short relayPort = [[relayPorts objectAtIndex:0] shortValue]; 

    // Pop this off the head of the queue. 
    self.relayPorts = ([relayPorts count] > 1) ? [relayPorts subarrayWithRange:NSMakeRange(1, [relayPorts count] - 1)] : [NSArray array]; 

    NSLog(@"C: Attempting to connect to server at: %@:%d", relayHost, relayPort); 

    self.connectTimer = [NSTimer scheduledTimerWithTimeInterval:connectTimeout 
                 target:self 
                 selector:@selector(connectionConnectedCheck:) 
                 userInfo:nil 
                 repeats:NO]; 

    [NSStream getStreamsToHostNamed:relayHost port:relayPort inputStream:&inputStream outputStream:&outputStream]; 
    if ((inputStream != nil) && (outputStream != nil)) 
    { 
     sendState = kSKPSMTPConnecting; 
     isSecure = NO; 

     [inputStream retain]; 
     [outputStream retain]; 

     [inputStream setDelegate:self]; 
     [outputStream setDelegate:self]; 

     [inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] 
           forMode:NSRunLoopCommonModes]; 
     [outputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] 
           forMode:NSRunLoopCommonModes]; 
     [inputStream open]; 
     [outputStream open]; 

     self.inputString = [NSMutableString string]; 



     return YES; 
    } 
    else 
    { 
     [self.connectTimer invalidate]; 
     self.connectTimer = nil; 

     [delegate messageFailed:self 
          error:[NSError errorWithDomain:@"SKPSMTPMessageError" 
                code:kSKPSMTPErrorConnectionFailed 
               userInfo:[NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Unable to connect to the server.", @"server connection fail error description"),NSLocalizedDescriptionKey, 
                  NSLocalizedString(@"Try sending your message again later.", @"server generic error recovery"),NSLocalizedRecoverySuggestionErrorKey,nil]]]; 

     return NO; 
    } 
} 
관련 문제