Announcement

Collapse
No announcement yet.

send mail to a gmail account from command line?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    send mail to a gmail account from command line?

    is there a way to forward my root (or user) email to my gmail account, or for that matter a way for me to send email from the command line (like in a script) to my gmail account?
    when I try mail -s subject myaddress@gmail.com it just gets rejected by gmail.

    #2
    Re: send mail to a gmail account from command line?

    I'm only familiar with using the command to check logs on a FreeBSD machine, I don't think you'd want to send mail as root. Does it work with other mail services?

    Comment


      #3
      Re: send mail to a gmail account from command line?

      I don't necessarily want to send mail as root as sending root's mail out.
      On my previous machine (Mandrake Spring 2007 edition) I had forwarded root's mail to the main user internally (through a procmail.rc I think), then that mail was getting forwarded to my gmail address. unfortunately I don't remember how I did it and that machine is now dead.

      I could try sending to my work email when I got home from work.

      Comment


        #4
        Re: send mail to a gmail account from command line?

        Originally posted by papaschtroumpf
        is there a way to forward my root (or user) email to my gmail account, or for that matter a way for me to send email from the command line (like in a script) to my gmail account?
        when I try mail -s subject myaddress@gmail.com it just gets rejected by gmail.
        You could use a .forward in your home directory, but gmail would likely reject that as well if your mail server doesn't have a reverse DNS record. This has to be configured on your ISP's DNS server.

        Anyway, a .forward file is placed in your home directory and contains only one line - the email address where you want the user's mail forwarded.

        Hope this helps -
        we see things not as they are, but as we are.
        -- anais nin

        Comment

        Working...
        X