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!

Sendmail by command line in Cpanel

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

  1. lowhigh

    lowhigh Active Member

    Joined:
    Jun 25, 2011
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    51
    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,608
    Likes Received:
    32
    Trophy Points:
    238
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. lowhigh

    lowhigh Active Member

    Joined:
    Jun 25, 2011
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    51
    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,608
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. lowhigh

    lowhigh Active Member

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

    I knew my problem!

    Thanks again!
     
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