Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

SENDMAIL, command line override SMTP server?

May
12,846
164
Apparently it's not possible to override the configured SMTP server with a SENDMAIL command line option. Tonight I have a use for that. I'll put it in the suggestions. Maybe I can do it temporarily with OPTION ... I'll try.
 
Apparently it's not possible to override the configured SMTP server with a SENDMAIL command line option. Tonight I have a use for that. I'll put it in the suggestions. Maybe I can do it temporarily with OPTION ... I'll try.

You can override the defaults with option. I have several .BAT files that look like this:

Code:
@echo off
Option //MailServer=smtp.somewhere.xxx
Option //[email protected]
Option //MailPort=587
Option //MailUser=username
Option //MailPassword=password

which I invoke before the SENDMAIL command. Don't forget to restore the original settings.
 
I did it more simply.
Code:
OPTION //MailServer=<override_server>
SENDMAIL ...
... not permanent, and I don't use SENDMAIL much, so I didn't need to restore.
But a SENDMAIL command line option would be easier (and could easily be made an alias).
 

Similar threads

Back
Top