#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    1
    Rep Power
    0

    Help! Creating a custom function that sends a mail.


    The function will be called m and it will allow you to send an email to someone using the mail command. The function should take the To: address, a Cc: address using the t parameter, a subject line using the s parameter and an input file. When running this function, you will type something like the following as an example:

    m firstemailhere secondemailhere subjecthere someinputfile


    I could really use a bit of help here... I'm not sure how to approach this. I thought it'd be something like this:

    m()
    {
    mail=$1
    -t=$2
    -t=$3
    -s=$4
    <=$5
    }

    But it doesn't seem to be working...
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2006
    Posts
    850
    Rep Power
    387

    Cool


    Originally Posted by Drucian
    The function will be called m and . . .

    I could really use a bit of help here... I'm not sure how to approach this. I thought it'd be something like this:
    . . .
    But it doesn't seem to be working...
    Perhaps if you first get familiar with the syntax of the 'mail' command, then you can try and code whatever.

IMN logo majestic logo threadwatch logo seochat tools logo