Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»General Articles»How to Install SendEmail in Linux

    How to Install SendEmail in Linux

    By RahulOctober 13, 20222 Mins Read

    This tutorial will help you to install a command line utility for sending emails from SMTP servers.

    Advertisement

    What is SendEmail?

    SendEmail is a lightweight command-line, SMTP e-mail client. It was designed to be used in bash scripts, batch files, Perl programs, and websites, but is also quite useful in many other contexts. SendEmail is written in Perl programming language and is unique in that it requires no special modules. It has a straightforward interface, making it very easy to use.

    Installing SendEmail on Linux

    The sendemail package is available under default package repositories for most Linux systems. Use the default package manager to install sendemail package on your system.

    • Using Debian package manager:
      sudo apt update 
      sudo apt install sendemail -y 
      
    • Using DNF package manager:
      sudo dnf makecache --refresh 
      sudo dnf install sendemail -y 
      

    Sending Emails with SendEmail

    Now, you can send emails via the remote SMTP servers via the command line or shell scripts. In order to send emails, you need SMTP details.

    Here is the basic sendemail command with the required parameters.

    echo "Email content here" | sendemail -l email.log \
         -u "Email Subject" \
         -f "[email protected]" \
         -t "[email protected]"  \
         -s "smtp.gmail.com:587"  \
         -xu "SMTP USER NAME"  \
         -xp "SMTP USER PASSWORD" \
         -o tls=yes 
    

    Type sendemail on terminal and hit enter to get more details about command line parameters.

    Conclusion

    This tutorial helped you to install the SendEmail command line utility for sending emails via remote SMTP servers. You can use any SMTP provider like Amazon SES, Sendgrid, Mailchimp, etc.

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    How to List Manually Installed Packages in Ubuntu & Debian

    10 Bash Tricks Every Developer Should Know

    How to Validate Email Address in JavaScript

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • How to List Manually Installed Packages in Ubuntu & Debian
    • 10 Bash Tricks Every Developer Should Know
    • How to Validate Email Address in JavaScript
    • Firewalld: Common Firewall Rules and Commands
    • 12 Apk Commands in Alpine Linux Package Management
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.