How to send email without using email client
-
Hi,
I'm working with mac 10.5 and xcode3.0.I've to send email from an
application with out using any email client.When i try to use message
framework,It doesn't work.(deliverMessage always returns no)Is there any
any way to send email from my application without using any email
client,and i've to send attachments also.
My other question is about vector graphics,Is there any way to implement
SVG in my cocoa application?Is there anyway to draw vector graphics other
than using GCDrawKit (because still it doesn't provide any
documentation).As a beginner i found it is really difficult to work with
GCDrawKit without documentation.
thanks -
Hi,
I'm working with mac 10.5 and xcode3.0.I've to send email from an
application with out using any email client.When i try to use message
framework,It doesn't work.(deliverMessage always returns no)Is there any
any way to send email from my application without using any email
client,and i've to send attachments also.
My other question is about vector graphics,Is there any way to implement
SVG in my cocoa application?Is there anyway to draw vector graphics other
than using GCDrawKit (because still it doesn't provide any
documentation).As a beginner i found it is really difficult to work with
GCDrawKit without documentation.
thanks
---------------------------------
Best Jokes, Best Friends, Best Food. Get all this and more on Best of Yahoo! Groups. -
NSMailDelivery (in the Message framework) has been deprecated in 10.5.
Even so, it still uses Mail.app to send email.
The only way I believe you can send email (without writing your own
SMTP client) is to use the Scripting Bridge to send the email via
Mail.app. Apple has recently posted sample code that does just that.
-- August
On May 8, 2008, at 5:52 AM, <vinitha...> wrote:
> Hi,
> I'm working with mac 10.5 and xcode3.0.I've to send email from an
> application with out using any email client.When i try to use message
> framework,It doesn't work.(deliverMessage always returns no)Is there
> any
> any way to send email from my application without using any email
> client,and i've to send attachments also.
>
> My other question is about vector graphics,Is there any way to
> implement
> SVG in my cocoa application?Is there anyway to draw vector graphics
> other
> than using GCDrawKit (because still it doesn't provide any
> documentation).As a beginner i found it is really difficult to work
> with
> GCDrawKit without documentation.
>
> thanks
-
On Thu, May 8, 2008 at 5:52 AM, <vinitha...> wrote:
> I'm working with mac 10.5 and xcode3.0.I've to send email from an
> application with out using any email client.When i try to use message
> framework,It doesn't work.(deliverMessage always returns no)Is there any
> any way to send email from my application without using any email
> client,and i've to send attachments also.
Have a look at Pantomime:
<http://www.collaboration-world.com/pantomime/>
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net -
On May 8, 2008, at 16:26, Sherm Pendley wrote:
> On Thu, May 8, 2008 at 5:52 AM, <vinitha...> wrote:
>
>
>> I'm working with mac 10.5 and xcode3.0.I've to send email from an
>> application with out using any email client.When i try to use message
>> framework,It doesn't work.(deliverMessage always returns no)Is
>> there any
>> any way to send email from my application without using any email
>> client,and i've to send attachments also.
>
>
> Have a look at Pantomime:
>
> <http://www.collaboration-world.com/pantomime/>
...which s LGPL - just to be aware of
There is also MailCore
http://www.theronge.com/mailcore/
and EdMessage
http://www.mulle-kybernetik.com/software/EDFrameworks/
No clue which one of those is most complete or has the nicest API.
Anyone more experiences with the various frameworks?
Kind of sucks one has to manage the SMTP server in every app
now ...but well.
cheers
--
Torsten -
On 8 May '08, at 3:10 AM, vinitha ks wrote:
> My other question is about vector graphics,Is there any way to
> implement
> SVG in my cocoa application?
Use a WebView and load an SVG document into it.
> Is there anyway to draw vector graphics other
> than using GCDrawKit (because still it doesn't provide any
> documentation).
You shouldn't need a 3rd party framework just to do drawing. CoreData
draws vector graphics, and Cocoa has wrappers like NSBezierPath.
—Jens -
On Thu, May 8, 2008 at 5:10 AM, vinitha ks <joshmiks...> wrote:
>
> Hi,
> I'm working with mac 10.5 and xcode3.0.I've to send email from an
> application with out using any email client.When i try to use message
> framework,It doesn't work.(deliverMessage always returns no)Is there any
> any way to send email from my application without using any email
> client,and i've to send attachments also.
>
I've had pretty good success with jwSMTP
(http://johnwiggins.net/jwsmtp/). It's a C++ library but it's been
pretty simple to wrap some basic Cocoa around it. Does attachments
although I've never used it for that.
--
Jim
http://nukethemfromorbit.com -
On Thu, May 8, 2008 at 8:10 AM, Jens Alfke <jens...> wrote:
> You shouldn't need a 3rd party framework just to do drawing. CoreData draws
> vector graphics, and Cocoa has wrappers like NSBezierPath.
Think you meant Core Graphics. -
On 08/05/2008, at 8:10 PM, vinitha ks wrote:
> I'm working with mac 10.5 and xcode3.0.I've to send email from an
> application with out using any email client.When i try to use message
> framework,It doesn't work.(deliverMessage always returns no)Is there
> any
> any way to send email from my application without using any email
> client,and i've to send attachments also.
Why do you wish to bypass an e-mail client? That doesn't sound very
user friendly.
- Chris -
On May 9, 2008, at 02:58, Chris Suter wrote:
>
> On 08/05/2008, at 8:10 PM, vinitha ks wrote:
>
>> I'm working with mac 10.5 and xcode3.0.I've to send email from an
>> application with out using any email client.When i try to use message
>> framework,It doesn't work.(deliverMessage always returns no)Is
>> there any
>> any way to send email from my application without using any email
>> client,and i've to send attachments also.
>
> Why do you wish to bypass an e-mail client? That doesn't sound very
> user friendly.
Why is that? It may hide complexity from the user. Sometimes email is
really only the transport.
And from a technical POV: There is more than just Mail.app users.
Are you sure your app can build up a mail message and pass that on to
mail client X?
cheers
--
Torsten -
On May 8, 2008, at 5:58 PM, Chris Suter wrote:
>
> On 08/05/2008, at 8:10 PM, vinitha ks wrote:
>
>> I'm working with mac 10.5 and xcode3.0.I've to send email from an
>> application with out using any email client.When i try to use message
>> framework,It doesn't work.(deliverMessage always returns no)Is
>> there any
>> any way to send email from my application without using any email
>> client,and i've to send attachments also.
>
> Why do you wish to bypass an e-mail client? That doesn't sound very
> user friendly.
>
> - Chris
>
I my case, a dental practice management system needs to automatically
email patients with appointment reminders from a system that typically
doesn't have a screen attached.
User friendly doesn't come into the picture.
NSMailDelivery worked fine for that but now another solution needs to
be identified.
Buddy Kurz -
By the sounds of that I'd recommend Pantomine then since setting up
the e-mail server info would only be required the once.
On 9 May 2008, at 15:44, Buddy Kurz wrote:
>
> On May 8, 2008, at 5:58 PM, Chris Suter wrote:
>
>>
>> On 08/05/2008, at 8:10 PM, vinitha ks wrote:
>>
>>> I'm working with mac 10.5 and xcode3.0.I've to send email from an
>>> application with out using any email client.When i try to use
>>> message
>>> framework,It doesn't work.(deliverMessage always returns no)Is
>>> there any
>>> any way to send email from my application without using any email
>>> client,and i've to send attachments also.
>>
>> Why do you wish to bypass an e-mail client? That doesn't sound very
>> user friendly.
>>
>> - Chris
>>
>
> I my case, a dental practice management system needs to
> automatically email patients with appointment reminders from a
> system that typically doesn't have a screen attached.
> User friendly doesn't come into the picture.
> NSMailDelivery worked fine for that but now another solution needs
> to be identified.
>
> Buddy Kurz
-
The problem with that is that when I start reading the LGPL license,
my brain cells start dying...
This is a marginally successful 25 year old closed source commercial
application and I don't mind being a self taught programer but I don't
want to be a self taught lawyer (or brain surgeon).
- Buddy
On May 9, 2008, at 7:52 AM, Mike Abdullah wrote:
> By the sounds of that I'd recommend Pantomine then since setting up
> the e-mail server info would only be required the once.
>
> On 9 May 2008, at 15:44, Buddy Kurz wrote:
>
>>
>> On May 8, 2008, at 5:58 PM, Chris Suter wrote:
>>
>>>
>>> On 08/05/2008, at 8:10 PM, vinitha ks wrote:
>>>
>>>> I'm working with mac 10.5 and xcode3.0.I've to send email from an
>>>> application with out using any email client.When i try to use
>>>> message
>>>> framework,It doesn't work.(deliverMessage always returns no)Is
>>>> there any
>>>> any way to send email from my application without using any email
>>>> client,and i've to send attachments also.
>>>
>>> Why do you wish to bypass an e-mail client? That doesn't sound
>>> very user friendly.
>>>
>>> - Chris
>>>
>>
>> I my case, a dental practice management system needs to
>> automatically email patients with appointment reminders from a
>> system that typically doesn't have a screen attached.
>> User friendly doesn't come into the picture.
>> NSMailDelivery worked fine for that but now another solution needs
>> to be identified.
>>
>> Buddy Kurz
>
-
On May 9, 2008, at 16:52, Mike Abdullah wrote:
> By the sounds of that I'd recommend Pantomine then since setting up
> the e-mail server info would only be required the once.
And where would you configure it? I think that is the annoying bit.
IMO it would make sense to have the SMTP server be configured in the
OS's network settings.
cheers
--
Torsten -
We have an internal app which sends emails in a similar fashion (all for
automated stuff, not for users to see/touch) and we shell out to a Perl
script which uses MIME::Lite to handle this.
It works perfectly for us. I'm not sure how applicable it will be for
you, but it's handled everything we've thrown at it so far.
Buddy Kurz wrote:
>
> On May 8, 2008, at 5:58 PM, Chris Suter wrote:
>
>>
>> On 08/05/2008, at 8:10 PM, vinitha ks wrote:
>>
>>> I'm working with mac 10.5 and xcode3.0.I've to send email from an
>>> application with out using any email client.When i try to use message
>>> framework,It doesn't work.(deliverMessage always returns no)Is there
>>> any
>>> any way to send email from my application without using any email
>>> client,and i've to send attachments also.
>>
>> Why do you wish to bypass an e-mail client? That doesn't sound very
>> user friendly.
>>
>> - Chris
>>
>
> I my case, a dental practice management system needs to automatically
> email patients with appointment reminders from a system that typically
> doesn't have a screen attached.
> User friendly doesn't come into the picture.
> NSMailDelivery worked fine for that but now another solution needs to
> be identified.
>
> Buddy Kurz
-
On 9 May '08, at 8:08 AM, Buddy Kurz wrote:
> The problem with that is that when I start reading the LGPL license,
> my brain cells start dying...
> This is a marginally successful 25 year old closed source commercial
> application and I don't mind being a self taught programer but I
> don't want to be a self taught lawyer (or brain surgeon).
The LGPL is pretty reasonable to work with, much more so than the
straight GPL. Given a choice I'll use BSD-type code, but I do use one
LGPL-licensed library in my current app.
The main things to be aware of are:
(1) The intent of the LGPL is to make sure that any user of your app
who wants to make changes to that library, can do so and use the
changed version in your app (even if they don't have your app's source
code.) Which implies...
(2) You can use the library in any kind of app (closed-source, BSD,
whatever) as long as you dynamically link against the library. That
is, don't add the library source code directly to your target;
instead, use another target or project or makefile to build it into a
dylib or framework, then add that to your app's target. [If you
statically link it, that's when the viral nature of the GPL infects
your code and requires that you GPL it too.]
(3) You have to make the source code of that library available. If you
didn't make any changes to the source, it suffices to say somewhere
(like in your About box or read-me) that you used "FooLib 1.4.5". If
you did make changes, which haven't been integrated back into the
library itself, then you have to put your source code somewhere (like
as a zip file on your website, or even inside your app bundle) and
give a link to it.
—Jens -
I have the same need and am trying to resurrect EDMessage (whose
project does not now even compile).
Just a quick note - this capability is of great value when your code
is running on some server inside a firewall, and you want to get
periodic status messages (and that server itself does not run smtp).
EDMessage originates from here:
http://www.mulle-kybernetik.com/software/EDFrameworks/
It requires EDCommon (from same site), but that framework has been
maintained and compiles without even a warning under Xcode 3.1
Preview 2.
EDMessage as is cannot connect when a login/password is required.
That said, there is an open source project called OPMessageServices
that was built on top of EDMessage:
http://sourceforge.net/projects/opmservices/
That project does have an enhanced connection class based on the
EDMessage class.
So, I created a new project, copied all the EDMessage source files
and headers into it, and was able to get it to compile with just a
few warnings and tweaks (a real complement to the author, since the
source is well over 5 years old!)
What I plan to do is back port the OPMessageServices enhancements,
then either put the code and project on my own site or get a
SourceForge project site.
I'll post something here when I get this done - probably a few weeks of work.
David -
I don't know the setup of your system, but if you've got a reasonably
modern RDBMS server running everything, there might be a SMTP
extension/module for that database that would let you set up a trigger
procedure that can send out e-mails to patients when new appointment
records are added. You'd get a lot more flexibility in terms of what
clients could connect, plus you'd be making sure that the e-mail would
be sent only after the transaction went through.
-- Ilan
On May 9, 2008, at 10:44 AM, Buddy Kurz wrote:
>
> On May 8, 2008, at 5:58 PM, Chris Suter wrote:
>
>>
>> On 08/05/2008, at 8:10 PM, vinitha ks wrote:
>>
>>> I'm working with mac 10.5 and xcode3.0.I've to send email from an
>>> application with out using any email client.When i try to use
>>> message
>>> framework,It doesn't work.(deliverMessage always returns no)Is
>>> there any
>>> any way to send email from my application without using any email
>>> client,and i've to send attachments also.
>>
>> Why do you wish to bypass an e-mail client? That doesn't sound very
>> user friendly.
>>
>> - Chris
>>
>
> I my case, a dental practice management system needs to
> automatically email patients with appointment reminders from a
> system that typically doesn't have a screen attached.
> User friendly doesn't come into the picture.
> NSMailDelivery worked fine for that but now another solution needs
> to be identified.
>
> Buddy Kurz
-
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 -
On May 9, 2008, at 10:48 AM, Jens Alfke wrote:
> 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.
This is typically a bad idea for another reason: With the amount of
spam in circulation today, many - If not most - mail servers now flat
out reject email that is not sent from reputable mail servers, where
by reputable I mean a combination of:
* Is not flagged as a spam relay
* Doesn't live on a dynamic IP block
* Has valid reverse pointer DNS configured
* Pass SPF validation
* et.c.
I think that the only safe approach is to use existing mail servers,
either one that the user provides, or one that your company /
organization can provide for the purpose of supporting your
application. This still leaves the original question unanswered of
course...
This is a very good "third party opportunity" for someone who would
like to make a name for themselves in the Cocoa community - much like
Sparkle, Growl, et.c.
j o a r -
Jens' description of the intent of the LGPL is pretty much the same as
my understanding.
However, another option exists. You can always contact the "author" of
the LGPL or GPL code and request a license agreement that allows you to
use their code in a closed product. Some are quite amenable to this sort
of arrangement and don't usually ask for a lot of money.
Cheers,
Jason -
On 9 May '08, at 11:03 AM, j o a r wrote:
> This is typically a bad idea for another reason: With the amount of
> spam in circulation today, many - If not most - mail servers now
> flat out reject email that is not sent from reputable mail servers
I don't think that's an issue. The "sendmail" command doesn't try to
send the email directly to the recipient's domain (unless you
configure Postfix to do so); instead it contacts the local SMTP server
and submits the message to it, just like Mail would. At least that's
what happened when I did this.
—Jens



