The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'E-mail Discussions' 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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page