sending mail using message framework
sending mail using message framework
- Subject: sending mail using message framework
- From: Peter Schols <email@hidden>
- Date: Thu, 6 Jun 2002 21:57:25 +0200
Hi,
I'm trying to get my app sending mail using Apple's message framework.
It works well when using the + (BOOL)deliverMessage:(NSString
*)messageBody subject:(NSString *)messageSubject to:(NSString
*)destinationAddress; method.
But when using the method below, I get an error: Exception raised
during message encoding: *** -[NSCFString containsAttachments]: selector
not recognized
+ (BOOL)deliverMessage: (NSAttributedString *)messageBody headers:
(NSDictionary *)messageHeaders format: (NSString *)messageFormat
protocol: (NSString *)deliveryProtocol;
Here is what I'm doing:
NSMutableDictionary *headers;
headers = [NSMutableDictionary dictionary];
[headers setObject:@"email@hidden" forKey:@"From"];
[headers setObject:@"email@hidden" forKey:@"To"];
[headers setObject:@"test" forKey:@"Subject"];
[headers setObject:@"myApp" forKey:@"X-Mailer"];
[headers setObject:@"text/plain; charset=US-ASCII; format=flowed"
forKey:@"Content-Type"];
[headers setObject:@"1.0" forKey:@"Mime-Version"];
[NSMailDelivery deliverMessage:alertMessage headers:headers
format:NSASCIIMailFormat protocol:nil];
alertMessage is an NSString.
Any ideas on what's going wrong here would be appreciated!
TIA
Peter
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.