{"id":19191,"date":"2024-03-08T18:57:23","date_gmt":"2024-03-08T17:57:23","guid":{"rendered":"https:\/\/contabo.com\/blog\/?p=19191"},"modified":"2024-03-12T12:54:34","modified_gmt":"2024-03-12T11:54:34","slug":"how-to-send-email-in-linux-from-the-command-line","status":"publish","type":"post","link":"https:\/\/contabo.com\/blog\/how-to-send-email-in-linux-from-the-command-line\/","title":{"rendered":"How to Send Email in Linux from the Command Line\u00a0with Sendmail and Mailx"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"630\" src=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2024\/03\/blog-head_how2-send-email-in-linux-from-the-command-line.jpg\" alt=\"Sendmail and Mailx\" class=\"wp-image-19257\" srcset=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2024\/03\/blog-head_how2-send-email-in-linux-from-the-command-line.jpg 1200w, https:\/\/contabo.com\/blog\/wp-content\/uploads\/2024\/03\/blog-head_how2-send-email-in-linux-from-the-command-line-600x315.jpg 600w, https:\/\/contabo.com\/blog\/wp-content\/uploads\/2024\/03\/blog-head_how2-send-email-in-linux-from-the-command-line-768x403.jpg 768w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Sending emails from the Linux command line is a skill that boosts productivity for system administrators and developers. It allows for efficient system notifications, report automation, and log file distribution. This guide provides a step-by-step approach to using sendmail and mailx for email communication via the command line. You will learn to install and configure these tools on various Linux distributions, craft basic email commands, attach files, automate email tasks, and address security considerations. With practical examples and straightforward explanations, we aim to empower you with the knowledge to enhance your system management tasks through command-line email functionalities.\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-installing-and-configuring-sendmail-and-mailx-in-linux\">Installing and Configuring Sendmail and Mailx in Linux<\/h2>\n\n\n\n<p>Email functionality from the command line in Linux is primarily facilitated by two tools: sendmail and mailx. Both serve important roles in sending emails, with sendmail acting as a mail transfer agent and mailx serving as a mail user agent. This section guides you through their installation and configuration on various Linux distributions, ensuring you are set up for seamless email communication.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-sendmail-installation-and-configuration\">Sendmail Installation and Configuration<\/h3>\n\n\n\n<p><strong>For Ubuntu\/Debian:<\/strong>&nbsp;<\/p>\n\n\n\n<p>Update your system packages:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get update<\/code><\/pre>\n\n\n\n<p>Install sendmail:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install sendmail<\/code><\/pre>\n\n\n\n<p>Configure sendmail with:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo sendmailconfig<\/code><\/pre>\n\n\n\n<p><strong>For CentOS\/RHEL:<\/strong>&nbsp;<\/p>\n\n\n\n<p>Ensure your package database is up-to-date with:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum update<\/code><\/pre>\n\n\n\n<p>Install sendmail by executing:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum install sendmail sendmail-cf<\/code><\/pre>\n\n\n\n<p>Start and enable sendmail on boot with:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl start sendmail<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl enable sendmail<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-mailx-installation\">Mailx Installation<\/h3>\n\n\n\n<p><strong>For Ubuntu\/Debian:<\/strong>&nbsp;<\/p>\n\n\n\n<p>Install mailx by running:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install mailutils<\/code><\/pre>\n\n\n\n<p><strong>For CentOS\/RHEL:<\/strong><\/p>\n\n\n\n<p>Use the command to install mailx to install mailx.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum install<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-basic-configuration-of-mailx\">Basic Configuration of Mailx<\/h3>\n\n\n\n<p>After installation, a minimal configuration is needed to start sending emails. For sendmail, most setups work fine with the default configuration. However, for specific needs, such as using a relay server, you might need to edit the \/etc\/mail\/sendmail.mc file and then regenerate the sendmail configuration with:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo make -C \/etc\/mail<\/code><\/pre>\n\n\n\n<p>For mailx, configuration often involves setting up the mailrc file (~\/.mailrc) with your email server settings. A simple mailrc configuration might look like this:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>set smtp=smtp:\/\/your.smtp.server&nbsp;\nset <a href=\"mailto:from=&quot;your_email@example.com\" target=\"_blank\" rel=\"noreferrer noopener\">from=\"your_email@example.com<\/a>\"&nbsp;\nset smtp-auth-user=your_username&nbsp;\nset smtp-auth-password=your_password&nbsp;\nset smtp-auth=login<\/code><\/pre>\n\n\n\n<p>This setup allows you to start sending emails using the command line, leveraging sendmail for email routing and delivery, and mailx for composing and sending the emails.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-sending-your-first-email-from-the-linux-command-line-nbsp\">Sending Your First Email from the Linux Command Line&nbsp;<\/h2>\n\n\n\n<p>Once you have sendmail and mailx installed and configured on your Linux system, sending emails from the command line becomes a simple task. This section will guide you through sending a basic email using both sendmail and mailx, catering to different preferences and requirements.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-sending-an-email-with-sendmail\">Sending an Email with Sendmail<\/h3>\n\n\n\n<p>Sendmail allows for direct email sending through the command line. Although it is more commonly used as a mail transfer agent, you can also use it to send simple messages directly. Here is how:&nbsp;<\/p>\n\n\n\n<p>Create a file named email.txt that contains the following:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Subject: Test Email via Sendmail&nbsp;\n&nbsp;\nThis is the body of the email. Hello from the command line!&nbsp;<\/code><\/pre>\n\n\n\n<p>Send the email using sendmail with the following command syntax:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sendmail <a href=\"mailto:recipient@example.com\" target=\"_blank\" rel=\"noreferrer noopener\">recipient@example.com<\/a> &lt; email.txt&nbsp;<\/code><\/pre>\n\n\n\n<p>Replace <a href=\"mailto:recipient@example.com\" target=\"_blank\" rel=\"noreferrer noopener\">recipient@example.com<\/a> with the actual email address of your recipient. This method is straightforward but less commonly used for sending emails directly due to its simplicity and limitations compared to mailx.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-sending-an-email-with-mailx\">Sending an Email with Mailx<\/h3>\n\n\n\n<p>Mailx offers a more flexible and interactive approach to sending emails from the command line. Here is a basic example:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"This is the body of the email\" | mailx -s \"Subject Here\" <a href=\"mailto:recipient@example.com\" target=\"_blank\" rel=\"noreferrer noopener\">recipient@example.com<\/a>&nbsp;<\/code><\/pre>\n\n\n\n<p>In this command:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>echo generates the email body.&nbsp;<\/li>\n\n\n\n<li>The output from echo is piped into mailx using |.&nbsp;<\/li>\n\n\n\n<li>-s is used to specify the subject of the email.&nbsp;<\/li>\n\n\n\n<li>Finally, you include the recipient&#8217;s email address.&nbsp;<\/li>\n<\/ul>\n\n\n\n<p><strong>Example Command with Mailx:<\/strong>&nbsp;<\/p>\n\n\n\n<p>For sending an email to <a href=\"mailto:john.doe@example.com\" target=\"_blank\" rel=\"noreferrer noopener\">john.doe@example.com<\/a> with the subject &#8220;Test Email&#8221; and the message &#8220;Hello, this is a test email from the command line!&#8221;:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"Hello, this is a test email from the command line!\" | mailx -s \"Test Email\" <a href=\"mailto:john.doe@example.com\" target=\"_blank\" rel=\"noreferrer noopener\">john.doe@example.com<\/a>&nbsp;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-attaching-files-to-an-email\">Attaching Files to an Email<\/h2>\n\n\n\n<p>Sending emails from the command line with attachments is an essential task for system administrators and developers, allowing the distribution of reports, documents, or log files with ease. While mailx offers a straightforward method for including attachments, it is important to note the limitations when considering sendmail for this purpose.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-attaching-files-with-mailx\">Attaching Files with Mailx<\/h2>\n\n\n\n<p>To attach a file to an email using mailx, use the -a option followed by the path to the file. The command structure is as follows:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"This is the body of the email\" | mailx -a \/path\/to\/file -s \"Subject Here\" <a href=\"mailto:recipient@example.com\" target=\"_blank\" rel=\"noreferrer noopener\">recipient@example.com<\/a>&nbsp;<\/code><\/pre>\n\n\n\n<p><strong>Example Command:<\/strong>&nbsp;<\/p>\n\n\n\n<p>Sending an email with an attached file named report.pdf:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"Please find the attached report\" | mailx -a .\/report.pdf -s \"Monthly Report\" <a href=\"mailto:john.doe@example.com\" target=\"_blank\" rel=\"noreferrer noopener\">john.doe@example.com<\/a>&nbsp;<\/code><\/pre>\n\n\n\n<p>This will send an email to <a href=\"mailto:john.doe@example.com\" target=\"_blank\" rel=\"noreferrer noopener\">john.doe@example.com<\/a> with the subject &#8220;Monthly Report,&#8221; containing a message and the report.pdf file attached.&nbsp;<\/p>\n\n\n\n<p><strong>For Multiple Attachments:<\/strong>&nbsp;<\/p>\n\n\n\n<p>You can attach multiple files by repeating the -a option:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"Please find the attached reports\" | mailx -a .\/report1.pdf -a .\/report2.csv -s \"Monthly Reports\" <a href=\"mailto:john.doe@example.com\" target=\"_blank\" rel=\"noreferrer noopener\">john.doe@example.com<\/a><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-limitations-with-sendmail-nbsp\">Limitations with Sendmail&nbsp;<\/h3>\n\n\n\n<p>When it comes to sendmail, attaching files directly through the command line is not inherently supported. Sendmail itself is a mail transfer agent (MTA) focused on the routing and delivery of email, rather than the composition of messages or inclusion of attachments. To send attachments via sendmail, you would typically need to construct a properly formatted email message that includes MIME (Multipurpose Internet Mail Extensions) encoded attachments, which can be cumbersome and is less straightforward than using mailx.&nbsp;<\/p>\n\n\n\n<p>For users needing to send emails with attachments from the command line, mailx (or similar tools that facilitate MIME encoding) is recommended for its ease of use and direct support for attachments.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-automating-email-sending-in-linux\">Automating Email Sending in Linux<\/h2>\n\n\n\n<p>Automating email dispatch from the command line is an important efficiency booster for system administrators and developers. It aids in the seamless execution of system alerts, report dissemination, and log file distribution. While we have covered using mailx for its simplicity, incorporating sendmail into automation scripts is also viable and provides a robust alternative for those who prefer or require its use. Here, we will explore automation examples using both sendmail and mailx.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-basic-automation-with-bash-scripts-using-mailx\">Basic Automation with Bash Scripts Using Mailx<\/h3>\n\n\n\n<p>Creating a simple bash script can facilitate the automated sending of emails. Below is a straightforward example demonstrating this with mailx:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash&nbsp;\n&nbsp;\n# Define recipient, subject, and body&nbsp;\n<a href=\"mailto:recipient=&quot;john.doe@example.com\" target=\"_blank\" rel=\"noreferrer noopener\">recipient=\"john.doe@example.com<\/a>\"&nbsp;\nsubject=\"System Update Notification\"&nbsp;\nbody=\"The system update completed successfully.\"&nbsp;\n&nbsp;\n# Sending email&nbsp;\necho \"$body\" | mailx -s \"$subject\" $recipient&nbsp;<\/code><\/pre>\n\n\n\n<p>This script can be manually executed or scheduled as a cron job for automated tasks.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-incorporating-attachments-with-mailx-nbsp\">Incorporating Attachments with Mailx&nbsp;<\/h3>\n\n\n\n<p>To automate sending an email with attachments using mailx, append the -a option:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash&nbsp;\n&nbsp;\n# Attachment path&nbsp;\nattachment=\"\/path\/to\/report.pdf\"&nbsp;\n&nbsp;\n# Other variables as previously defined&nbsp;\n&nbsp;\n# Send email with attachment&nbsp;\necho \"$body\" | mailx -a \"$attachment\" -s \"$subject\" $recipient&nbsp;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-basic-automation-with-bash-scripts-using-sendmail-nbsp\">Basic Automation with Bash Scripts Using Sendmail&nbsp;<\/h2>\n\n\n\n<p>Sendmail can also be employed for email automation, although it involves a slightly different approach, especially when dealing with MIME types for attachments. Here is an example that sends a plain text email:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash&nbsp;\n&nbsp;\n# Define recipient and subject&nbsp;\n<a href=\"mailto:recipient=&quot;john.doe@example.com\" target=\"_blank\" rel=\"noreferrer noopener\">recipient=\"john.doe@example.com<\/a>\"&nbsp;\nsubject=\"System Update Notification\"&nbsp;\nbody=\"The system update completed successfully.\"&nbsp;\n&nbsp;\n# Construct email headers and body&nbsp;\n(&nbsp;\necho \"To: $recipient\"&nbsp;\necho \"Subject: $subject\"&nbsp;\necho \"Content-Type: text\/plain\"&nbsp;\necho&nbsp;\necho \"$body\"&nbsp;\n) | sendmail -t&nbsp;<\/code><\/pre>\n\n\n\n<p>This script forms the basic structure of an email and sends it via sendmail.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-scheduling-emails-with-cron-nbsp\">Scheduling Emails with Cron&nbsp;<\/h2>\n\n\n\n<p>Scheduling automated emails, whether through sendmail or mailx, can be accomplished with cron jobs. To schedule your script:&nbsp;<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\">\n<li>Edit your cron table with crontab -e.&nbsp;<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>Add a schedule entry, for example:&nbsp;<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>0 8 * * * \/path\/to\/your_script.sh<\/code><\/pre>\n\n\n\n<p>This sets the script to run daily at 8:00 AM server time.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-security-considerations-for-sending-emails-from-the-linux-command-line\">Security Considerations for Sending Emails from the Linux Command Line<\/h2>\n\n\n\n<p>When utilizing the command line for email sending, prioritizing security is important. Here is a condensed guide to keeping your email interactions secure:&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Security Practice<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>Secure Connections &nbsp;<\/td><td>Use SMTP over SSL\/TLS to protect your emails during transmission.&nbsp;&nbsp;<\/td><\/tr><tr><td>Authentication and Access Controls&nbsp;<\/td><td>Employ secure authentication methods and restrict access to scripts and configuration files containing sensitive details. Avoid storing passwords in plain text.&nbsp;&nbsp;<\/td><\/tr><tr><td>Sanitize Input &nbsp;<\/td><td>Ensure thorough sanitization of external inputs for scripts to prevent exploitation.&nbsp;&nbsp;<\/td><\/tr><tr><td>Activity Monitoring &nbsp;<\/td><td>Keep an eye on email sending activities and maintain logs for auditing and identifying anomalies.&nbsp;&nbsp;<\/td><\/tr><tr><td>Updates and Patches &nbsp;<\/td><td>Regularly update your email-related software to safeguard against vulnerabilities.&nbsp;&nbsp;<\/td><\/tr><tr><td>Attachment Security &nbsp;<\/td><td>Scan attachments for malware to prevent spreading harmful software.&nbsp;&nbsp;<\/td><\/tr><tr><td>Sensitive Information &nbsp;<\/td><td>Exercise caution when sending sensitive data. Use encryption or secure file transfer methods for highly confidential information.&nbsp;&nbsp;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>This guide has equipped you with the essentials for sending emails from the Linux command line, showcasing sendmail and mailx setup, basic usage, file attachments, and automation. We emphasized the importance of security, from secure connections to handling sensitive data cautiously. By mastering these skills, system administrators and developers can optimize their workflow and maintain robust security protocols. Embrace these practices to streamline your email tasks, ensuring secure and effective communication within your Linux environment.&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to efficiently send emails in Linux using the command line. Master the art of email communication with Sendmail and Mailx.<\/p>\n","protected":false},"author":50,"featured_media":19257,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[18],"tags":[],"ppma_author":[1491],"class_list":["post-19191","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"uagb_featured_image_src":{"full":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2024\/03\/blog-head_how2-send-email-in-linux-from-the-command-line.jpg",1200,630,false],"thumbnail":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2024\/03\/blog-head_how2-send-email-in-linux-from-the-command-line-150x150.jpg",150,150,true],"medium":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2024\/03\/blog-head_how2-send-email-in-linux-from-the-command-line-600x315.jpg",600,315,true],"medium_large":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2024\/03\/blog-head_how2-send-email-in-linux-from-the-command-line-768x403.jpg",768,403,true],"large":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2024\/03\/blog-head_how2-send-email-in-linux-from-the-command-line.jpg",1200,630,false],"1536x1536":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2024\/03\/blog-head_how2-send-email-in-linux-from-the-command-line.jpg",1200,630,false],"2048x2048":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2024\/03\/blog-head_how2-send-email-in-linux-from-the-command-line.jpg",1200,630,false]},"uagb_author_info":{"display_name":"Tobias Mildenberger","author_link":"https:\/\/contabo.com\/blog\/author\/tobias\/"},"uagb_comment_info":0,"uagb_excerpt":"Learn how to efficiently send emails in Linux using the command line. Master the art of email communication with Sendmail and Mailx.","authors":[{"term_id":1491,"user_id":50,"is_guest":0,"slug":"tobias","display_name":"Tobias Mildenberger","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/077178d5dce6c3d4c0c0396857a7e544bfdf8adf04145fff5160b33a22e28b1f?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts\/19191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/users\/50"}],"replies":[{"embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/comments?post=19191"}],"version-history":[{"count":6,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts\/19191\/revisions"}],"predecessor-version":[{"id":19260,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts\/19191\/revisions\/19260"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/media\/19257"}],"wp:attachment":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/media?parent=19191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/categories?post=19191"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/tags?post=19191"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=19191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}