Article 5D9R0 Send mail smtp config

Send mail smtp config

by
dba_not_adm9
from LinuxQuestions.org on (#5D9R0)
Hello-

I'm not a sysdamin and if this was already documented somewhere I apologize.

Requirement: Send email as part of shell script with log file as attachment.

My code: echo "Export of database completed at `date`" | mail -s "Subject Here" <email_address> -a logfile.log

The above code runs without any errors but I do not receive the email.

Question: Where do I tell mail command what my smtp relay server for email ? The man page did have options other than creating account and I am not sure if that is the best approach.latest?d=yIl2AUoC8zA latest?i=XyC-zxK7zuY:uNglWPa5IIc:F7zBnMy latest?i=XyC-zxK7zuY:uNglWPa5IIc:V_sGLiP latest?d=qj6IDK7rITs latest?i=XyC-zxK7zuY:uNglWPa5IIc:gIN9vFwXyC-zxK7zuY
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments