FROM : Jens Alfke
DATE : Fri May 09 19:48:39 2008
You can also send mail pretty easily by using NSTask to invoke /usr/
bin/sendmail — the parameters are pretty simple, check the man page.
Normally I'm not a big advocate of getting things done by running Unix
commands, but in this case the alternatives are all pretty complex and
involve a lot of 3rd party code.
However, this requires that Postfix (the mail daemon) be enabled. I
know it ships in the OS, but I don't know whether it's enabled by
default (to the extent of being able to send messages), and if so
whether it's able to get the SMTP configuration from somewhere. I've
used this before, but I may have been relying on configuring Postfix
myself on the machine this was running on. But that might not be a
serious problem, if you only need to run this on a server that's under
your control.
—Jens
DATE : Fri May 09 19:48:39 2008
You can also send mail pretty easily by using NSTask to invoke /usr/
bin/sendmail — the parameters are pretty simple, check the man page.
Normally I'm not a big advocate of getting things done by running Unix
commands, but in this case the alternatives are all pretty complex and
involve a lot of 3rd party code.
However, this requires that Postfix (the mail daemon) be enabled. I
know it ships in the OS, but I don't know whether it's enabled by
default (to the extent of being able to send messages), and if so
whether it's able to get the SMTP configuration from somewhere. I've
used this before, but I may have been relying on configuring Postfix
myself on the machine this was running on. But that might not be a
serious problem, if you only need to run this on a server that's under
your control.
—Jens






Cocoa mail archive

