1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SENDMAIL, command line override SMTP server?

Discussion in 'Support' started by vefatica, Jul 16, 2012.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,962
    Likes Received:
    30
    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.
     
  2. dcantor

    Joined:
    May 29, 2008
    Messages:
    507
    Likes Received:
    3
    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.
     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,962
    Likes Received:
    30
    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).
     

Share This Page