XGEN: Using the SENDMAIL.EXE Utility with the AT Scheduler

Last reviewed: January 6, 1998
Article ID: Q151670
The information in this article applies to:
  • Microsoft Exchange Server, version 4.0

SUMMARY

The Microsoft Exchange Resource Kit contains a program, Sendmail.exe, which is a 32-bit command line utility to send mail messages and file attachments. This program is also available in the Microsoft Mail Resource Kit.

Microsoft Exchange Administrators may need to run this program automatically, using the AT Scheduler in Windows NT or the Winat.exe program, that ships in the Windows NT Resource Kit.

This article explains how to send mail using Sendmail.exe and the AT scheduler.

MORE INFORMATION

Programs scheduled with the Windows NT AT scheduler are run by the Windows NT Schedule service. In order to send mail to an Exchange mailbox, using the SENDMAIL.EXE program, the Schedule service must start using a domain account. By default the service will start using the LocalSystem account.

The steps below explain how to use the Sendmail.exe program with the AT scheduler.

  1. Log on to Windows NT with a domain account, for example DOMAIN\USER.

  2. From the Windows NT Control Panel, run the Services tool.

  3. Select the Schedule service and press the Startup button.

  4. In the "Log On As" section, click on This Account and then click on the ellipsis to bring up the list of domain users. Select DOMAIN\USER.

  5. Enter the password for DOMAIN\USER in the Password and Confirm Password fields.

  6. In the Startup Type section, select Automatic. This will cause the service to automatically start when the computer is started.

  7. Click OK and close the Services dialog box.

  8. From the Windows NT Control Panel, run the Mail and Fax tool.

  9. Create a profile with the name SENDMAIL. Add the Exchange Server service to the profile.

  10. Make sure that the Windows NT account DOMAIN\USER that was specified to start the Schedule service has permissions to open the Exchange mailbox specified in the profile. Go into Exchange Administrator program and give the mailbox (the one pointed to by the profile in step 10) the Send As permission (or the Mailbox Owner permission) on the permissions page of the mailbox's properties. Make sure to select the correct options in the Tools, Options/Permissions page so that the Permissions page is displayed for each the mailbox object along with the user rights.

  11. The following command can then be used with the AT scheduler or the Winat.exe program:

    SENDMAIL.EXE -u <profile name> -p password -r <recipients> -s <subject>

    The <profile name> is the name of the profile we created in step 10, Sendmail. SENDMAIL.EXE requires a password. The password specified with the -p option is only to prevent SENDMAIL.EXE from failing. It is not used.

Please refer to the documentation accompanying the SENDMAIL.EXE for more information on all the command line switches available.

NOTE:In order for the AT scheduler to be able to successfully run the Sendmail.exe program, you must be logged on to Windows NT as a DOMAIN\USER. This User must be the account used to start the Schedule service and must have access to the mailbox that Sendmail.exe will log on to.

Additional Reference Words:

Keywords          : XGen kbusage
Version           : 4.0 5.0
Platform          : WINDOWS


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 6, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.