

The variables set are the same as those used in the “all in one command”. Set from="$FROM_EMAIL_ADDRESS($FRIENDLY_NAME)"įor better security, you may set the mode of ~/.mailrc to 600 by chmod 600 ~/.mailrc. Set smtp-auth-password=$EMAIL_ACCOUNT_PASSWORD We can write most of them into mailx/mail’s configuration file ~/.mailrc set smtp-use-starttls There are too many options in the above command? Yes… I must confess so. You can easily find it out by looking into the directory ~/.mozilla/firefox. Yyyyyyyy is a random string that’s different for different users. But if your system does not have an updated nssdb, you may consider using Firefox’s instead by adding such option -S nss-config-dir=~/.mozilla/firefox/fault/įind out Firefox’s profile directory in the home directory which commonly has a format like this: ~/.mozilla/firefox/fault Most Linux system’s default nssdb should be already updated so that gmail is good with it. Click on “Select App” → “Other”, type “mailx”, and hit “Generate”. You can generate an “App Password” for mailx so it can be easily revoked in case it leaked out.
#Mail command in linux not working mac verification#


(use `s-nail` instead in releases without the heirloom mailx) $ mailx -v -s "$EMAIL_SUBJECT" \ This is an all-in-one command that sends email to $TO_EMAIL_ADDRESS If you want to enter from address with owner’s name, you can use, for example, following format: -S “from=System User “ Note, that when setting from variable, domain name of host is automatically added if value does not contain any. Sets the internal option variable and, in case of a string option, assigns value to it. Mailx accepts most configuration in the command line directly from the -S options in format -S variable (check more in mailx manual).
