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!

send email from ssh?

Discussion in 'E-mail Discussion' started by 10101, Aug 31, 2004.

  1. 10101

    10101 Well-Known Member

    Joined:
    Sep 4, 2003
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    166
    Hi,

    how do you send an email from ssh to test email is working?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    507
    Likes Received:
    4
    Trophy Points:
    168
    This should work, it does for me

    mail -s "put subject here" toemail

    if you want to send an attachment
    filenm=somefile.xls
    emailto=you@yourdomain.com

    uuencode $filenm $filenm | mail -s "Accounts Filename: $filenm" $emailto
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. 10101

    10101 Well-Known Member

    Joined:
    Sep 4, 2003
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    166
    mail -s "put subject here" toemail doesnt seem to work for me, it just hangs
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    507
    Likes Received:
    4
    Trophy Points:
    168
    Sorry about that.

    I must have change perms to 755 on my server.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. 10101

    10101 Well-Known Member

    Joined:
    Sep 4, 2003
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    166
    thanks for your replies, i have chmod /usr/bin/mail to 755 too but it still hangs
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Roy@ENHOST

    Roy@ENHOST Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    493
    Likes Received:
    0
    Trophy Points:
    316
    Location:
    Los Angeles California
    Firstly, you have to check if mail function is even existent.

    try type mail

    If it says function not found then you are out of luck.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. StevenC

    StevenC Well-Known Member

    Joined:
    Jan 1, 2004
    Messages:
    252
    Likes Received:
    0
    Trophy Points:
    166
    i use:

    echo "Test" | mail -s "Test" toemail
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. linux-image

    linux-image Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    1,191
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    India
    cPanel Access Level:
    Root Administrator
    mail -v username@domainname.com

    This will ask for a subject.. type <Enter>

    type body <Enter>

    Cc:

    then CNTRL + d

    thatz all.
     
    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