create a bash file to send emails

Discussion in 'Installation/Configuration' started by misterm, Oct 21, 2010.

  1. misterm

    misterm Member HowtoForge Supporter

    Hello everyone, I'm back, I have a question, how we create a bash file to send emails when I say this not to be spam, but just to justify that this goes perfectly.

    Script source bash :

    Thank you for your help

    MM:confused:;)
     
  2. falko

    falko Super Moderator ISPConfig Developer

    You can try something like this:

    Code:
    cat /path/to/message.txt | formail -c -I"Subject: bla" -I"From: someone@somedomain.com" -I"To: you@yourdomain.com" -I"Received: from www.somedomain.com ([1.2.3.4])" | sendmail you@yourdomain.com
     

Share This Page