Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Exim abandoned: unknown, malformed, or incomplete option -s

Discussion in 'E-mail Discussion' started by Salou20, Jul 3, 2014.

  1. Salou20

    Salou20 Registered

    Joined:
    Jul 3, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Knoxville, Tennessee, United States
    cPanel Access Level:
    Root Administrator
    Hi all, I am getting the following error in my ssh terminal when my script prompts an email to be sent:

    exim abandoned: unknown, malformed, or incomplete option -s

    My script is as follows:
    Code:
    void send_alert(const std::string &subject, const std::string &text) {
      start_sql("SELECT * FROM tconfig;");
      run_sql();
    
      std::string sender_addr = decode_str(sql_result("sender_addr"));
      std::string alert_addr = decode_str(sql_result("alert_addr"));
    
      end_sql();
    
      std::string filename = tmpnam(NULL);
      std::ofstream file(filename.c_str());
      file << text;
      file.close();
    
      std::string cmd = "mail " + alert_addr + " -s '" + subject + "' < " + filename;
    
      system(cmd.c_str());
    }

    any suggestions?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,442
    Likes Received:
    1,962
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    The "s" flag as you have used it is not valid. EX:

    Code:
    # exim -s
    exim abandoned: unknown, malformed, or incomplete option -s
    You should update the script so it uses a valid flag.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice