• Register
First time here? Checkout the FAQ!
Welcome to Find4Answers.com

Where you can Ask Questions, Find Answers Or Receive Answers from other members of the community And Share in Social networking sites like facebook, linkedin, twitter.
3cx phone system assignment writing service bandar bola best waikiki restaurants boiler business car car insurance quotes car insurance quotes car insurance quotes car lease deals car leasing uk chwilówka przez internet zapewne company convey convey law complaints convey law reviews convey law service conveylaw cosmetic dentist csr classics hack csr classics hack csr classics hack data data recovery maidenhead deals design development double glazing leeds electrician electrician manchester electricians emergency farm filmy bez limitu filmy online finlock finlock solutions general genral golf holidays spain graduate jobs in london graduate jobs london heap how to jump higher how to jump higher how to jump higher infrared sauna infrared sauna saunas inline skating java judi bola law law firm in leeds lease leasing led lights led bulbs leeds legal smoke life insurance quotes log london manchester mercedes lease deals mercedes leasing mezzanine movies museums and art nikogo szybka chwilówka none none none ny male revue outsource link building paid search agency performance car hire personal personal injury lawyer porcelain veneers ramię szybkie chwilówki recovery restaurant seo seo agencies seo company seo company london seo las vegas seo services services sky diamond seo solutions steel synchronization szybka chwilówka przykład szybka chwilówka żaden szybkie chwilówki lekko temp cover car insurance temp cover car insurance temp cover car insurance thread tymczasem chwilówki przez internet upvc windows manchester viagra kamagra videos vinyl flooring suppliers wait web development company window repairs london windows zobaczyć szybka chwilówka

Shell script to send mail using telnet in Linux

0 votes
How can i use another SMTP server and send mail in shell script without having own any MTA (sendmail or mail or exim)
asked Aug 30, 2012 in Shell Script by anonymous

1 Answer

0 votes


# Function for sending email
function sendemail(){
sleep 8
echo helo $SMTP_DOMAIN
echo mail from: $MAIL_SENDER_ADDRESS
sleep 2
echo rcpt to: $to_mail
sleep 2
echo data
sleep 2
echo to: $to_email_addresslist
sleep 2
sleep 2
echo subject:  $MAIL_SUBJECT
echo $1
sleep 5
echo .
sleep 5
echo ^]
sleep 2
echo quit ) | telnet
echo "status:$?"

sendemail "This is message Body of email"

answered Aug 30, 2012 by sarada Hot Users (2,340 points)
Please note that the line no 32, statement "echo ^]" is not a character, you have to press ctrl+] key in your keyboard and that character will appear in your editor. and then you save it.
Thanks a lot dear , nice explanation

Related questions

0 votes
1 answer 133 views
0 votes
1 answer 138 views
0 votes
1 answer 145 views