SENDMAIL, command line override SMTP server?

May 20, 2008
12,178
133
Syracuse, NY, USA
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
572
4
Groton, CT
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 //MailAddress=me@myemailaddress.xxx
Option //MailPort=587
Option //MailUser=username
Option //MailPassword=password

which I invoke before the SENDMAIL command. Don't forget to restore the original settings.
 
May 20, 2008
12,178
133
Syracuse, NY, USA
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

C
Replies
1
Views
2K