Add support for outgoing mail priority header. #91

Merged
merged 2 commits into from Jun 2, 2013

Conversation

Projects
None yet
2 participants
@pitiphong-p
Contributor

pitiphong-p commented Apr 2, 2013

Mail priority header is defined in IMAP RFC 4021. This pull request add support for setting the mail priority header in the outgoing message.

Source/CTCoreMessage.m
@@ -700,6 +735,10 @@ - (NSString *)rfc822Header {
return [nsresult autorelease];
}
+- (void)setMailPriority:(CTCoreMessagePriority)priority {
+ self->mailPriority = priority;

This comment has been minimized.

Show comment Hide comment
@mronge

mronge Apr 3, 2013

Member

The self-> here isn't necessary, but otherwise looks good

@mronge

mronge Apr 3, 2013

Member

The self-> here isn't necessary, but otherwise looks good

Source/CTCoreMessage.m
+ mailimf_fields_add(fields, priorityField);
+
+ priority = mailimf_optional_field_new("Priority", rfcPriorityValue);
+ priorityField = mailimf_field_new(MAILIMF_FIELD_OPTIONAL_FIELD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, priority);

This comment has been minimized.

Show comment Hide comment
@mronge

mronge Apr 3, 2013

Member

Add a line breaks because this line is so long

@mronge

mronge Apr 3, 2013

Member

Add a line breaks because this line is so long

Source/CTCoreMessage.m
+
+ struct mailimf_optional_field * priority = mailimf_optional_field_new("X-Priority", xPriorityValue);
+
+ struct mailimf_field * priorityField = mailimf_field_new(MAILIMF_FIELD_OPTIONAL_FIELD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, priority);

This comment has been minimized.

Show comment Hide comment
@mronge

mronge Apr 3, 2013

Member

Add a line breaks because this line is so long

@mronge

mronge Apr 3, 2013

Member

Add a line breaks because this line is so long

mronge added a commit that referenced this pull request Jun 2, 2013

Merge pull request #91 from pitiphong-p/outgoing_priority_header
Add support for outgoing mail priority header.

@mronge mronge merged commit d716226 into MailCore:master Jun 2, 2013

@mronge

This comment has been minimized.

Show comment Hide comment
@mronge

mronge Jun 2, 2013

Member

Thanks again! You are a machine :)

Member

mronge commented Jun 2, 2013

Thanks again! You are a machine :)

@pitiphong-p pitiphong-p deleted the pitiphong-p:outgoing_priority_header branch Jun 2, 2013

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