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.

Sendmail by command line in Cpanel

Discussion in 'E-mail Discussions' started by lowhigh, Aug 22, 2011.

  1. lowhigh

    lowhigh Active Member

    Joined:
    Jun 25, 2011
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Hi everybody!

    Cpanel uses Exim for sending/receiving email
    I have a bash shell that auto send mail to us by common command like this:
    Code:
    #!/bin/sh
    
    (
    action
    ) | /bin/mail -s 'My subject' my@email.com
    
    
    But now, I use "exim" command to test but it requires more typing and i don't know how to put all in one shell scripts.

    Code:
    exim -v -odf my@email.com
    My subject
    .
    
    Successfully......

    Anybody can edit this command for scripts?

    Thanks very much
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Why are you attempting to send using exim odf specifically, since sendmail way will work? exim is used for debugging purposes, and unless your script is to test exim working, I'm uncertain why you would be attempting to use this for sending via your test script. Please explain the purpose.
     
  3. lowhigh

    lowhigh Active Member

    Joined:
    Jun 25, 2011
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Hi Tristan!

    My purpose is very simple, i only want to send mail from Cpanel system to outgoing mail account with a notification.
    I try the old script but it doesn't work, so i think, Exim has override sendmail binary, so i try Exim and see that it can send mail by those command!
    Now you have any idea for my work?
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
  5. lowhigh

    lowhigh Active Member

    Joined:
    Jun 25, 2011
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Thanks Tristan!

    I knew my problem!

    Thanks again!
     
Loading...

Share This Page