Link to home
Start Free TrialLog in
Avatar of Sida Say
Sida SayFlag for Cambodia

asked on

How to send email via SMTP in Linux script?

Hello All Expert-Exchange,

Now I have a Linux posfix/dovecot mail server and I set up a script to send daily report via email with sendmail but after a few week it fail in to spam:
pflogsumm /var/log/maillog | formail -c -I"Subject: Mail Daily Report" -I"From: Example Mail <root@crosswired.net>" -I"To: me@example.com" -I"Received: from Postmaster" | sendmail postmaster@example.com

Open in new window



and now I want this script to send mail via SMTP but I cannot find how.
Can you give any suggestion?
SOLUTION
Avatar of Hello World
Hello World

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Jan Bacher
Jan Bacher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial