Skip to content

Sending email through Window Service

vidya

Asked Mar 19, 2007, 5:42 PM EDT1 answer
Share
LinkedInX
I have class library.. with method to send mail.. I want to use window service which would intantiate this class and send mail when time elapses.

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Hi vidya,
    Call the function that contains logic to send main in the
    protected override void OnStart(string[] args) method of ServiceBase class.

    I have tried like this and mail will be send each time the service was started. Similarly, call the method according to the time u mention.
    0