Jump to content

Send e-mail using a script


 Share

Recommended Posts

Hiya folks,

 

I spent the last 2 days, with no luck, trying to find a script that will send an e-mail from a simple shell script.

 

What I want to happen is for my simple backup script to drop an e-mail to me when it has completed. My backup is working fine from the script, but when sending the e-mail, using: "mail -s <Subject> <recipient> " it hangs waiting for output for the actual message, then with a "Cc:" prompt waiting for more keyboard input for a CC recipient then it requires a "Ctrl-D" to actually send.

 

How can I get this all to work in one fell swoop or have the script imitate the keyboard input.

 

Thanks,

 

RED

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...