SENDMAIL, command line override SMTP server?

#1
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.
 
May 29, 2008
533
3
Groton, CT
#2
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.
 
#3
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).