• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: sending email
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sending email


  • Subject: Re: sending email
  • From: "Peter Sichel" <email@hidden>
  • Date: Wed, 14 May 2003 11:11:29 -0400

>>> I am needing to send an email (a text buffer with a header) to port 25
>>> of a given IP and would like to ask the list what would be the
>>> smartest
>>> approach using C/C++ with Carbon mach-o on 10.2. I am mostly looking
>>> for simplicity and reliability.
>>>
>>> Thank's in advance.
>>>
>>> Best regards
>>>
>>> Patrick Perroud
>>
>> Consider using the Message.framework hidden in
>> /System/Library/Frameworks.
>>
>
>Is it possible to use it from a Carbon Mach-O app ?

I'm not sure what the rules are for calling an objective-C
framework from a Carbon application. The framework itself
works nicely from Cocoa as illustrated below.

- Peter


// ----------------------------------------------------------------------
// 7 sendEmail
// ----------------------------------------------------------------------
// send current log text as email if enabled
- (void)sendEmail
{
NSString* str;
do {
if ([preferences integerForKey:kPreferences_mailEnable]) {
if (![NSMailDelivery hasDeliveryClassBeenConfigured]) {
NSLog(@"EventLogger: Mail delivery class has not been configured");
break;
}
str = [preferences objectForKey:kPreferences_mailName];
if (!str) {
NSLog(@"EventLogger: mail to address has not been configured");
break;
}
[NSMailDelivery deliverMessage:[mText string]
subject:@"--- IPNetSentry Security Log ---"
to:str];
}
} while (false);
}
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: sending email
      • From: Quinn <email@hidden>
References: 
 >Re: sending email (From: Stéphane Pinel <email@hidden>)

  • Prev by Date: A configuration question
  • Next by Date: Re: sending email
  • Previous by thread: Re: sending email
  • Next by thread: Re: sending email
  • Index(es):
    • Date
    • Thread