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.

send email from ssh?

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

  1. 10101

    10101 Well-Known Member

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

    how do you send an email from ssh to test email is working?
     
  2. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
    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
     
  3. 10101

    10101 Well-Known Member

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

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
    Sorry about that.

    I must have change perms to 755 on my server.
     
  5. 10101

    10101 Well-Known Member

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

    Roy@ENHOST Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    495
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
  7. StevenC

    StevenC Well-Known Member

    Joined:
    Jan 1, 2004
    Messages:
    254
    Likes Received:
    0
    Trophy Points:
    16
    i use:

    echo "Test" | mail -s "Test" toemail
     
  8. linux-image

    linux-image Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    1,192
    Likes Received:
    1
    Trophy Points:
    38
    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.
     
Loading...

Share This Page