Hi folks,

I was looking through the documentation and was pleased to find exactly what
I wanted, i.e. how to call ns_sendmail from a C module.

However, upon looking at the example code:

    NS_DStringVarAppend(&dsScript, "ns_sendmail", to, " ",
      from, " ", subject, " ", body);
    status=Ns_TclEval(&dsResult, Ns_ConnServer(conn),
      dsScript.string)

I'm left wondering what the extra space strings (" ") are for? Again, from
the documentation, the ns_sendmail usage is:

    ns_sendmail to from subject body ?extraheaders? ?bcc?

If the " " are there for the gaps between to, from and subject, why isn't
there one between "ns_sendmail" and to?

The other thing that puzzles me is that the documentation for
NS_DStringVarAppend says the list must end with a NULL, and this is missing
from the code example.

To make it completely obvious even to a buffoon like me, can someone please
give an example of how to send an email to: [EMAIL PROTECTED], from:
[EMAIL PROTECTED], subject: Hiya, body: How u doin? Email me back!

Thanks,
Jason

Reply via email to