Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiply recipients dont send to GMail #54

Open
GoogleCodeExporter opened this issue Jan 8, 2016 · 0 comments
Open

Multiply recipients dont send to GMail #54

GoogleCodeExporter opened this issue Jan 8, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

SKPSMTPMessage sends to the SMTP address all at once, and must send one by one.

There is my changes in the parseBuffer function:

                case kSKPSMTPWaitingFromReply:
                {
                    if ([tmpLine hasPrefix:@"250 "]) {

                        if (!multipleRcptTo) {
                            NSMutableString *multipleRcptToString = [NSMutableString string];
                            [multipleRcptToString appendString:[self formatAddresses:toEmail]];
                            [multipleRcptToString appendString:[self formatAddresses:ccEmail]];
                            [multipleRcptToString appendString:[self formatAddresses:bccEmail]];

                            multipleRcptTo = [[multipleRcptToString componentsSeparatedByString:@"\r\n"] mutableCopy];
                            [multipleRcptTo removeLastObject];
                        } 
                        if ([multipleRcptTo count] > 0) {
                            NSString *rcptTo = [NSString stringWithFormat:@"%@\r\n", [multipleRcptTo objectAtIndex:0]];
                            [multipleRcptTo removeObjectAtIndex:0];

                            DEBUGLOG(@"C: %@", rcptTo);
                            if (CFWriteStreamWriteFully((CFWriteStreamRef)outputStream, (const uint8_t *)[rcptTo UTF8String], [rcptTo lengthOfBytesUsingEncoding:NSUTF8StringEncoding]) < 0)
                            {
                                error =  [outputStream streamError];
                                encounteredError = YES;
                            }
                            else
                            {
                                [self startShortWatchdog];
                            }
                        } 
                        if ([multipleRcptTo count] == 0) {
                            sendState = kSKPSMTPWaitingToReply;

                        }
                    }
                    break;
                }


and add this into header:


    NSMutableArray *multipleRcptTo;


Original issue reported on code.google.com by [email protected] on 1 Jul 2011 at 1:25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant