1

How can I send an attachment via mail command in Mac OS? I have configured msmtp to send email using Gmail's SMTP server and that is working ok. In Linux, I have used hairloom-mailx in combination with ssmtp to send attachments, but it seems that homebrew doesn't have hairloom-mailx. What alternative I can use here?

My .msmtprc looks like this.

account noreply.email@gmail.com
host smtp.gmail.com
port 587
tls on
tls_starttls on
auth on
user noreply.email
from noreply.email@gmail.com
password my_password
account default : noreply.email@gmail.com

I have also created a .mailrc file in my home folder.

set sendmail="/usr/local/bin/msmtp"

Any suggestions would be highly appreciated. Thank you.

Rohit Farmer
  • 319
  • 4
  • 15

0 Answers0